Re: [w3c/webcomponents] The way to access current script or current root, from Shadow DOM (#717)

The specific problem with enabling `document.currentScript` is that it gives global-reachable pointer into the shadow tree. So if the currently executing script (that is in a shadow tree) calls some other global function that will now have access to the shadow tree. That violates 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/717#issuecomment-366505806

Received on Sunday, 18 February 2018 10:18:50 UTC