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

Regarding https://github.com/w3c/webcomponents/issues/377,

I thought that document.currentScript should return null if a *running* script is in a shadow tree,
however, given that "document.currentScript" is always executed by the *script*, this situation looks like : "the script is just accessing the script element which is running *me*".

It's like a *this* pointer... This does not seem to violate an encapsulation.

Thus, what document.currentScript should be? Is it okay to return a script element in a shadow tree?


---
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

Received on Friday, 1 April 2016 03:28:28 UTC