Update text.class.js

rename  method