I'm trying to shim Element.prototype.children
which should return a HTMLCollection
There is a window.HTMLCollection
However
var h = new HTMLCollection();
//TypeErrror: HTMLCollection is not a constructor
and
var h = Object.create(HTMLCollection.prototype);
h[0] = div;
h.item(0);
// Could not convert JavaScript argument
Test Firefox 7 and Chrome
Apart from shimming HTMLCollection
is there any way to interact with it?
Also provide feedback on this github issue if you can suggest a solution
MyHTMLCollection
constructor and then use it instead of the host constructorHTMLCollection
(which is not reliable) – Bul