[Harmony Proxies] Proposal: Property fixing
cam at mcc.id.au
Thu May 12 17:17:29 PDT 2011
> DOM objects are defined in ECMAScript as "host objects". As such, they
> can do whatever they want with [[Class]] (as they always have). There is
> no need for proxies to change.
Except of course for the desire to implement the DOM using proxies.
> Anyway, I think that the idea is to define the DOM as ECMAScript
> (proxies included). Following this path, maybe that WebIDL could do a
> willful violation as it's sometimes done in HTML5.
It could (and probably will have to if there’s no way other way to get
Object.prototype.toString to return the right values), but I thought
proxies were developed precisely (well, as one of their main goals) so
that we didn’t need to do this.
> Another idea is that Object.prototype.toString could return different
> things for DOM objects. This can certainly be implemented in pure
> ES.next with WeakMaps. It's duck-typing, so a bit ugly, but possible anyway.
True, that would be one way around it.
Cameron McCormack ≝ http://mcc.id.au/
More information about the es-discuss