diff options
Diffstat (limited to 'src/modules/core/textable.js')
-rw-r--r-- | src/modules/core/textable.js | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/modules/core/textable.js b/src/modules/core/textable.js index b0a0993..55df7c6 100644 --- a/src/modules/core/textable.js +++ b/src/modules/core/textable.js @@ -1,25 +1,19 @@ import { globals } from '../../utils/window.js' // Create plain text node -export function plain ( text ) { - +export function plain (text) { // clear if build mode is disabled - if ( this._build === false ) { - + if (this._build === false) { this.clear() - } // create text node - this.node.appendChild( globals.document.createTextNode( text ) ) + this.node.appendChild(globals.document.createTextNode(text)) return this - } // Get length of text element export function length () { - return this.node.getComputedTextLength() - } |