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

Aryeh Gregor ayg at aryeh.name
Thu Dec 1 11:12:14 PST 2011


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.


More information about the whatwg mailing list