On Tue, Jan 8, 2013 at 4:30 PM, Andrea Giammarchi <[email protected]> wrote: > so you are saying that Object.observe() does not suffer these problems ? Or > is just much simpler than Proxies ? ( yeah, I know, I guess both ... )
Object.observe is different, it works on at [[Get]], [[Put]], [[DefineProperty]] level. In WebKit/V8, the DOM object is represented by a normal JS object with has some internal pointers to the C++ object it wraps. Simply speaking the implementation does not know how to unwrap a proxy to the underlying C++ object. more below > On Tue, Jan 8, 2013 at 1:23 PM, Tab Atkins Jr. <[email protected]> wrote: >> It can potentially be solved by efforts like moving the DOM into JS, >> which browsers are pursuing to various degrees, but it's a hard >> problem on the impl side. Meanwhile, there is unforgeable magic >> behind DOM objects, and nothing we can really do about it. We could potentially switch from magic to private symbols but DOM bindings are highly optimized and I don't think we could afford making these use symbols. (Right now the pointer is stored at a statically know offset of the js object.) -- erik _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

