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

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 25 Nov 2011 23:06:10 -0500
Message-ID: <4ED065B2.9040506@mit.edu>
On 11/25/11 10:19 PM, Cameron McCormack wrote:
> 1. if property name is in set S, then:
> a. look on element
> b. look on element's form (if it has one)
> c. look on document
> otherwise:
> a. look at element's named properties (if it has any)
> b. look at element's form's named properties (if it has a form)
> 2. look on window
> where S is the set of property names corresponding to
> * the IDL attributes, operations and constants on element's
> interface,
> * those on HTMLFormElement (if the element has a form), and
> * those on Document
> for the current set of APIs we have deployed.
> Would this work? Does it sound too brittle or hacky?

It would break existing pages that use expandos on elements or documents 
via barewords in on* attributes.

One important question is whether pages do that, of course.

Received on Friday, 25 November 2011 20:06:10 UTC

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