"In terms of implementation complexity on our end, it's trivial as long as we 
don't follow the WebIDL spec and make things like HTMLAnchorElement actual 
Function instances."

You said you want to make it a function. I am just trying to say thats ok, as 
long it says "object" for typeof.

Andreas

On Dec 31, 2012, at 8:44 AM, Boris Zbarsky <bzbar...@mit.edu> wrote:

> 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

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to