- From: Takayoshi Kochi <notifications@github.com>
- Date: Tue, 20 Feb 2018 11:05:16 +0000 (UTC)
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 20 February 2018 11:06:37 UTC
As @annevk 's https://github.com/w3c/webcomponents/issues/717#issuecomment-366505806, I don't think we revert the `document.currentScript` decision to return `null` for shadows. If we pursue `currentRoot`, maybe implement `DocumentOrShadowRoot.currentRoot` and `DocumentOrShadowRoot.currentScript` and use the code ```js function getCurrentScript() { var root = document; while (root != root.currentRoot) root = root.currentRoot; return root.currentScript; } ``` which is a similar approach to `DocumentOrShadowRoot.activeElement`. But similar to what @rniwa stated above, I feel reluctant to add new features to classic script. -- 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-366943265
Received on Tuesday, 20 February 2018 11:06:37 UTC