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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>106857</bug_id>
          
          <creation_ts>2013-01-14 19:30:16 -0800</creation_ts>
          <short_desc>[Shadow DOM]: ShadowAware.shadowRoot is not implemented</short_desc>
          <delta_ts>2013-01-22 23:38:49 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</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>63606</blocked>
    
    <blocked>103230</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter name="Aleksei Yu. Semenov">a.semenov</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>morrita</cc>
    
    <cc>shinyak</cc>
    
    <cc>webcomponents-bugzilla</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>806906</commentid>
    <comment_count>0</comment_count>
    <who name="Aleksei Yu. Semenov">a.semenov</who>
    <bug_when>2013-01-14 19:30:16 -0800</bug_when>
    <thetext>The Shadow DOM specification (http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html)
defines interface ShadowAware as:

10.2.1 ShadowAware Attributes

pseudo of type DOMString
    Represents the custom pseudo-element value, associated with the element.
    On getting, the attribute must return the current custom pseudo-element value or empty string if there is no custom pseudo-element associated with this element.
    On setting, these steps must be run:
    If the custom pseudo-element, associated with this element already exists, discard it
    If the new value is not null, create a new custom pseudo-element with element and the new value as its value.
shadowRoot of type ShadowRoot
    Represents the top shadow tree in the &quot;as rendered&quot; structure.
    On getting, the attribute must return the youngest tree that has the context object as its shadow host, or null if no such shadow tree is accesible.
    For HTML elements, the UA-provided shadow trees must not be accessible.

However, the following sample test shows, that attribute ShadowAware.shadowRoot always equal to undefined value.

&lt;html&gt;
&lt;head&gt;
&lt;script&gt;
function test(){
	var host = document.createElement(&apos;div&apos;);
    document.body.appendChild(host);
	document.write(&apos;host.shadowRoot: &apos;+host.shadowRoot+&apos; (should be null)&lt;BR&gt;&apos;);
    document.write(&apos;created shadow root&lt;BR&gt;&apos;);
	var shadowRoot = host.webkitCreateShadowRoot();
	document.write(&apos;host.shadowRoot: &apos;+host.shadowRoot+&apos; (should be &apos;+shadowRoot+&apos;)&lt;BR&gt;&apos;);
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body onload=&apos;test()&apos;&gt;
&lt;/body&gt;
&lt;html&gt;

Observed on Google Chrome version 26.0.1383.0 canary</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>806956</commentid>
    <comment_count>1</comment_count>
    <who name="Shinya Kawanaka">shinyak</who>
    <bug_when>2013-01-14 21:19:34 -0800</bug_when>
    <thetext>We&apos;re using prefixed version of API, so host.webkitShadowRoot should work.

http://jsfiddle.net/dXu4k/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>813906</commentid>
    <comment_count>2</comment_count>
    <who name="Hajime Morrita">morrita</who>
    <bug_when>2013-01-22 23:38:49 -0800</bug_when>
    <thetext>Closing - The property is there with a prefixed form.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>