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

The use cases for this are the same for the main document, ex. reading data off the `<script>` element.

`<script src="..." data-option1="..." data-option2="..."></script>`

if you appendChild that to your shadowRoot, document.currentScript is needed for the script to be able to read back option attributes. I don't think we can invent a new or fancier context aware property, that requires tagging every function to see what script created it.

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

Received on Monday, 4 April 2016 16:40:23 UTC