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

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