Re: [w3c/webcomponents] document.currentScript from a script in a shadow tree. (#477)

Per https://html.spec.whatwg.org/multipage/dom.html#dom-document-currentscript,
> The currentScript attribute, on getting, must return the value to which it was most recently initialised. When the Document is created, the currentScript must be initialised to null.

Wait...  As per the definition, I might be wrong:

1  A 'click' event listener is registered in a script in a document tree
2. <script> is added to a shadow tree
3. Users clicks a button
4. In the event listener, document.currentScript is accessed.

In this case, it looks that we violate an encapsulation.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/477#issuecomment-204233441

Received on Friday, 1 April 2016 03:38:05 UTC