<?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>18535</bug_id>
          
          <creation_ts>2012-08-10 23:16:33 +0000</creation_ts>
          <short_desc>[Custom]: Scoping of element definitions in Shadow DOM</short_desc>
          <delta_ts>2012-08-24 20:31:15 +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>PC</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>17103</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Dimitri Glazkov">dglazkov</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>dominicc</cc>
    
    <cc>jackalmage</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>72067</commentid>
    <comment_count>0</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-08-10 23:16:33 +0000</bug_when>
    <thetext>Should element definitions (the &lt;element&gt; thingies) be scoped inside
of a shadow DOM subtree?

That is, in parallel with id/name/selector scoping, would it make
sense to do the same with element definitions?

This means that you will have to explicitly state which components you
want to use inside of each &lt;element&gt;, but also means that you can have
a whole set of internal components that aren&apos;t surfaced to the
document.

Example:

Bob has framework A and framework B used on his page. Both define
x-qux, and A one wins. Bad news for framework B, which happens to also
use it in its components.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72069</commentid>
    <comment_count>1</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2012-08-10 23:39:50 +0000</bug_when>
    <thetext>Experience suggests that this kind of collision is easily worked
around by library authors, by a combination of simple prefixing and just googling for names beforehand.  I don&apos;t think we need to give it a technical solution.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72095</commentid>
    <comment_count>2</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2012-08-13 03:34:25 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; Should element definitions (the &lt;element&gt; thingies) be scoped inside
&gt; of a shadow DOM subtree?
&gt; 
&gt; ...
&gt; 
&gt; This means that you will have to explicitly state which components you
&gt; want to use inside of each &lt;element&gt;, but also means that you can have
&gt; a whole set of internal components that aren&apos;t surfaced to the
&gt; document.

The proposed solution might be workable for large, complex components that have a single instance on a page. However if there are going to be multiple instances of a component on a page, something that means each instance has its own copy of the element definitions sounds heavyweight.

(In reply to comment #1)
&gt; Experience suggests that this kind of collision is easily worked
&gt; around by library authors, by a combination of simple prefixing and just
&gt; googling for names beforehand.  I don&apos;t think we need to give it a technical
&gt; solution.

Is it so easily worked around?

What about the related problem of integrating two copies of different versions of the same script library in the same page?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72292</commentid>
    <comment_count>3</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-08-16 16:01:10 +0000</bug_when>
    <thetext>Also, what happens with elements that aren&apos;t in tree?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72731</commentid>
    <comment_count>4</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-08-24 20:31:15 +0000</bug_when>
    <thetext>http://dvcs.w3.org/hg/webcomponents/rev/da7ba1b845b3

Made it iterate all enclosed trees for now. We can get back to this later.

Split the free-standing elements question into bug 18684.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>