W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2011

[whatwg] API design restrictions due to barewords in onxxx="" attributes

From: Aryeh Gregor <ayg@aryeh.name>
Date: Thu, 1 Dec 2011 14:12:14 -0500
Message-ID: <CAKA+Ax=5X5PqsgCWs8q6DR4DVZ2NXVHUzvAxy6KC_H6AS=BmYQ@mail.gmail.com>
On Fri, Nov 25, 2011 at 11:06 PM, Boris Zbarsky <bzbarsky at mit.edu> wrote:
> It would break existing pages that use expandos on elements or documents via
> barewords in on* attributes.

Isn't that the point of "look at element's named properties (if it has
any)" and "look at element's form's named properties (if it has a
form)"?  I assumed "named properties" meant "expando attributes".  We
could add a check for the document's named properties too.  This way,
if we introduce Element.prototype.matches or something, that would be
skipped entirely in bareword on* lookups.  The only new properties we
define that would ever be hit for bareword on* lookups are ones on the
window, and those would be last in the lookup chain -- which is the
same behavior as for non-on* bareword uses.
Received on Thursday, 1 December 2011 11:12:14 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:38 UTC