direct_proxies "problem"

Andrea Giammarchi andrea.giammarchi at gmail.com
Tue Jan 8 12:40:00 PST 2013


So, I am playing with FF 18 and I have this behavior:

var a = new Proxy([], {});
console.log(a instanceof Array); // true
console.log(Array.isArray(a));   // true
console.log({}.toString.call(a));// [object Array]
Function.apply(null, a);         // anonymous()

Cool uh? there's no way to tell that a is not actually an array but
rather a proxy: awesome!!!

Now I go in that dark place called DOM:

var n = new Proxy(document.createElement("p"), {});
console.log(n instanceof HTMLElement);// true
console.log({}.toString.call(n));     // true
document.body.appendChild(n);
// Error: Could not convert JavaScript argument arg 0
[nsIDOMHTMLBodyElement.appendChild]

Is this meant? 'cause it looks lik ewe have half power here and once
again inconsistencies ... thanks for explaining me this.


br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130108/63dcc658/attachment.html>


More information about the es-discuss mailing list