Status: New
Owner: [email protected]
Labels: Type-Defect Priority-Medium jQuery

New issue 1408 by [email protected]: On FF, defer taming of items in a NodeList until they are accessed
http://code.google.com/p/google-caja/issues/detail?id=1408

jQuery uses the pattern getElementsByTagName('*') because browsers can respond quickly with all the objects; with our current implementation, this is exactly wrong, since we then have to tame all objects before returning them.

On most browsers, NodeLists must tame all elements in advance, since there's no support for intercepting numeric accesses even with an ES53 proxy.

Recent FF versions have native proxy support, so we can wrap the node list in a native proxy that lazily tames items.

On other ES5 implementations, when we're taming a particular NodeList n, we can put getters on TameNodeList.prototype up to n.length.

Reply via email to