diff --git a/src/html/script.js b/src/html/script.js index 7621be2..aec7f18 100644 --- a/src/html/script.js +++ b/src/html/script.js @@ -16,7 +16,15 @@ 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) { + // text of script is in a child node of the element + // scripts with < operator must be in a CDATA node + for (var i=0; i