get text() {
        var kids = this.childNodes;
        var kid;
        var s = '';
        var imax = kids.length;
        for (var i = 0; i < imax; ++i) {
            kid = kids[i];
            if (kid.nodeType === Node.TEXT_NODE ||
                kid.nodeType === Node.CDATA_SECTION_NODE) {
                s += kid.nodeValue;
            }
        }
        return s;
    }
HTML5 spec @ http://dev.w3.org/html5/spec/Overview.html#script

"The IDL attribute text must return a concatenation of the
contents of all the text nodes that are direct children of the
script element (ignoring any other nodes such as comments or
elements), in tree order. On setting, it must act the same way
as the textContent IDL attribute."

AND... "The term text node refers to any Text node,
including CDATASection nodes; specifically, any Node with node
type TEXT_NODE (3) or CDATA_SECTION_NODE (4)"