When parsing a Document Fragment, the appendChild method calls Array.prototype.push.apply(nodelist, newChild.childNodes.toArray() );
But as NodeList.toArray() returns self, you will receive Exception TypeError: Function.prototype.apply: Arguments list has wrong type.
I got around this issue by putting back the original toArray() method:
toArray: function () {
var children = [];
for ( var i=0; i < this.length; i++) {
children.push (this[i]);
}
return children;
},
When parsing a Document Fragment, the appendChild method calls
Array.prototype.push.apply(nodelist, newChild.childNodes.toArray() );
But as
NodeList.toArray()
returns self, you will receive Exception TypeError: Function.prototype.apply: Arguments list has wrong type.I got around this issue by putting back the original
toArray()
method: toArray: function () { var children = []; for ( var i=0; i < this.length; i++) { children.push (this[i]); } return children; },See commit https://github.com/orslumen/env-js/commit/bb3c8db36cf904ccd3f7da62b10081156d143a77