<?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>26213</bug_id>
          
          <creation_ts>2014-06-26 21:47:43 +0000</creation_ts>
          <short_desc>Need a shadowRoots MutationObserver option</short_desc>
          <delta_ts>2015-07-06 08:04:06 +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>MOVED</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Elliott Sprehn">esprehn</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>adamk</cc>
    
    <cc>annevk</cc>
    
    <cc>bugs</cc>
    
    <cc>eoconnor</cc>
    
    <cc>esprehn</cc>
    
    <cc>kochi</cc>
    
    <cc>mike</cc>
    
    <cc>mjs</cc>
    
    <cc>public-webapps</cc>
    
    <cc>rniwa</cc>
    
    <cc>sorvell</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>108402</commentid>
    <comment_count>0</comment_count>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2014-06-26 21:47:43 +0000</bug_when>
    <thetext>Per the discussion in bug 24861 (See https://www.w3.org/Bugs/Public/show_bug.cgi?id=24861#c4) We should add a new MutationObserver option that lets you watch for additions of new ShadowRoots. Otherwise there&apos;s no way to detect DOM modifications that happen in new minted ShadowRoots.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108403</commentid>
    <comment_count>1</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2014-06-26 22:21:02 +0000</bug_when>
    <thetext>And I thought it was one of the main points of Shadow DOM to hide its internals
from the outside world...

If you need to know about the internals of shadow DOM, you probably shouldn&apos;t
use it at all, but just plain normal DOM, IMHO.


(Somewhat similar use case to bug 24861#c4 came up in
 FFOS localization. Though, there whenever a component wants to be
 localizable can register itself to some global service after
 shadow dom creation.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108405</commentid>
    <comment_count>2</comment_count>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2014-06-26 23:04:08 +0000</bug_when>
    <thetext>(In reply to Olli Pettay from comment #1)
&gt; And I thought it was one of the main points of Shadow DOM to hide its
&gt; internals
&gt; from the outside world...
&gt; 
&gt; If you need to know about the internals of shadow DOM, you probably shouldn&apos;t
&gt; use it at all, but just plain normal DOM, IMHO.

Shadow DOM is about making sure consumers don&apos;t accidentally access the internals.

The current approach is to replace Element.prototype.createShadowRoot which I think makes Gecko go into slow mode, and doesn&apos;t work from isolated script contexts that extensions run inside.

It&apos;s also brittle since libraries are fighting to be first so they can replace the built in function before anyone uses it.

&gt; 
&gt; 
&gt; (Somewhat similar use case to bug 24861#c4 came up in
&gt;  FFOS localization. Though, there whenever a component wants to be
&gt;  localizable can register itself to some global service after
&gt;  shadow dom creation.)

This doesn&apos;t work in use cases for global attribute polyfills or libraries that use them, or for extensions.

Instead of library authors hacking around us, we should just give them this ability.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108412</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-06-27 06:02:36 +0000</bug_when>
    <thetext>So we keep adding new features that don&apos;t actually explain the platform, but make it more complicated. I&apos;m not a fan.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108511</commentid>
    <comment_count>4</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2014-06-30 20:02:07 +0000</bug_when>
    <thetext>(In reply to Anne from comment #3)
&gt; So we keep adding new features that don&apos;t actually explain the platform, but
&gt; make it more complicated. I&apos;m not a fan.

^ THIS × Googolplex.

Indeed this doesn&apos;t strike me as a good direction to take.  It&apos;s one thing if the shadow root was deliberately exposed by the author, but adding an option to intrude into any shadow root seems to defeat the whole point of using shadow DOM altogether.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121633</commentid>
    <comment_count>5</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2015-07-06 08:04:06 +0000</bug_when>
    <thetext>Moved to https://github.com/w3c/webcomponents/issues/204</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>