Re: Solving the "how do I tell whether I have an HTML element?" (or image element, or whatever) problem

On 1/1/13 5:56 PM, Allen Wirfs-Brock wrote:
> I'd argue that this is an ECMAScript issue rather than a Web API issue.

Sure.  That's why we're talking about it on this mailing list, which is 
in large part about coordinating with the ES working group, no?

> It isn't clear that fixing it for Web APIs while leaving it broken for everything else actually benefits JavaScript programmers.  Rather than trying to fix it via WebIDL bindings perhaps it would be better to lobby TC39 to fix (or replace it) for everything.

It's come up before, iirc.  No progress was made...

> The default  @@hasInstance behavior is the traditional ES instanceof check.  However, all it takes to change that is to define an alternative @hasInstance method on a constructor.

Lovely!

-Boris

Received on Tuesday, 1 January 2013 23:00:36 UTC