[whatwg] API design restrictions due to barewords in onxxx=""
attributes  Cameron McCormack cam at mcc.id.au Fri Nov 25
19:19:16 PST 2011  This problem of using bare variables names
rather than  window.variableName in event handler attributes
(which Boris mentions in  https://developer.mozilla.org/Writing_
Forward_Compatible_Websites) seems  annoying.  Is there any way
we can avoid it by codifying current  property lookup behaviour
for all existing properties on  elements/Document/Window while
allowing newly introduced properties not  to be found when using
bare identifiers?  I think we could have an object on the scope
chain (when onxxx=""s are  run) that will, instead of having
names resolved in this order:     1. look on element    2. look
on element's form (if it has one)    3. look on document    4.
look on window  (which I assume is achieved by simply having
those four objects on the  scope chain in that order) does this
instead:     1. if property name is in set S, then:         a.
look on element