diff --git a/src/html/script.js b/src/html/script.js index 5edb3f4..7621be2 100644 --- a/src/html/script.js +++ b/src/html/script.js @@ -16,6 +16,9 @@ var HTMLScriptElement = function(ownerDocument) { HTMLScriptElement.prototype = new HTMLElement; __extend__(HTMLScriptElement.prototype, { get text(){ + if (this.childNodes.length == 1 && this.childNodes[0].nodeType == DOMNode.TEXT_NODE) { + return this.childNodes[0].nodeValue; + } return this.nodeValue; }, get htmlFor(){