On 12/30/12 10:34 PM, Andreas Gal wrote:
In this sea of terrible choices, how about making HTMLAnchorElement an actual function, 
but having it return "object" for typeof?

Apart from being an ES violation (which we're in the business of anyway, at the moment), what does that actually buy us?

Right now, in my tree, HTMLAnchorElement is an object with a [[Call]], so typeof returns "function" and it has a JSClass that lets us override the behavior of instanceof.

But if it were an actual function then we couldn't change how instanceof behaves (it would just look up the proto chain of the LHS for the value of HTMLAnchorElement.prototype), right? What do we get from making its typeof return "object"?

Feel like I'm missing something,
Boris
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to