This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Section 4.1 reads: > The nodes and named elements are not accessible using shadow host's > document DOM tree accessors [...] Document DOM tree accessors include document.currentScript (cf. <http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-tree-accessors>). When a script element in a shadow tree is running, what should document.currentScript return? From what I read the current specification, a script element in a shadow tree should not be exposed to document.currentScript, but it is unclear what should be returned instead. It might be fine to return a script element in a shadow tree, because it can only be obtained from the script inside the shadow tree (i.e. scripts on the owner document will not be able to obtain the script element in the shadow tree), if I understand correctly.
We no longer use the phrase 'DOM tree accessors' in the spec. Let me close this. I think the current spec implies that document.currentScript should not return a script in shadow trees.