W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2013

Re: Maybe we should think about Interface.isInterface functions again

From: Anne van Kesteren <annevk@annevk.nl>
Date: Sat, 20 Jul 2013 09:08:23 -0700
Message-ID: <CADnb78jtVyGxGkE8GdVJY1JipRwG2cM0PR11ZBU6OGKnnxqJbA@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Domenic Denicola <domenic@domenicdenicola.com>, Travis Leithead <travis.leithead@microsoft.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Sat, Jul 20, 2013 at 5:25 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> https://twitter.com/kuvos/status/348019487120957440 and following discussion
> has a description of such a situation arising in real-life code: the code
> wants to test for ownerDocument being non-null, but it only wants to do this
> on Node objects, of course.  And HTMLElement.prototype is one of the objects
> it ends up being passed, for whatever reason...

So why does the attribute getter in
http://dev.w3.org/2006/webapi/WebIDL/#dfn-attribute-getter throw? You
say it's because of boolean attributes. Could you give an example of
how that would go wrong? It seems like an edge case.

Having said that

% HTMLElement.prototype instanceof Node
%  document.body.appendChild(HTMLElement.prototype)

does seem kind of sucky (happens across browsers, although TypeError
is not entirely consistent yet, IE throws HierarchyRequestError and
Chrome/Safari NotFoundError).

Received on Saturday, 20 July 2013 16:08:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:17 UTC