@@unscopable and event handlers

Jason Orendorff jason.orendorff at gmail.com
Wed Sep 25 15:02:07 PDT 2013


Suppose I have:

    <p onclick="alert('hello')">

This creates new object environment records. (See the HTML spec, "When
an event handler content attribute is set", step 6:
<http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#event-handler-content-attributes>)

1. I think the design intent of @@unscopable was that event handlers
*would* be affected, but it doesn't seem to be specified that way,
yet. Should ES6 factor anything differently to accommodate what HTML
is trying to do there?

2. Will this cause document[@@unscopable] to be retrieved and
examined? If so, that can trigger arbitrary user code, right? Is that
OK?

-j


More information about the es-discuss mailing list