<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>22411</bug_id>
          
          <creation_ts>2013-06-20 01:51:03 +0000</creation_ts>
          <short_desc>[Shadow]: Specify the interaction with document.currentScript</short_desc>
          <delta_ts>2014-05-29 06:46:14 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Component Model</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>22715</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Yuta Kitamura">yutak</reporter>
          <assigned_to name="Hayato Ito">hayato</assigned_to>
          <cc>hayato</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>89619</commentid>
    <comment_count>0</comment_count>
    <who name="Yuta Kitamura">yutak</who>
    <bug_when>2013-06-20 01:51:03 +0000</bug_when>
    <thetext>Section 4.1 reads:
&gt; The nodes and named elements are not accessible using shadow host&apos;s
&gt; document DOM tree accessors [...]

Document DOM tree accessors include document.currentScript
(cf. &lt;http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-tree-accessors&gt;).

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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106959</commentid>
    <comment_count>1</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2014-05-29 06:46:14 +0000</bug_when>
    <thetext>We no longer use the phrase &apos;DOM tree accessors&apos; in the spec.
Let me close this.

I think the current spec implies that document.currentScript should not return a script in shadow trees.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>