On Monday, February 18, 2013 at 10:12 PM, Dimitri Glazkov wrote:
> On Mon, Feb 18, 2013 at 1:01 PM, Anne van Kesteren <ann...@annevk.nl > (mailto:ann...@annevk.nl)> wrote: > > On Mon, Feb 18, 2013 at 8:57 PM, Dimitri Glazkov <dglaz...@google.com > > (mailto:dglaz...@google.com)> wrote: > > > Still unclear. Are you saying this: if we have API members on > > > ShadowRoot that aren't on DocumentFragment, then ShadowRoot should not > > > be a DocumentFragment? > > > > No. all I'm saying that "we" made a conscious choice not to have > > innerHTML on DocumentFragment and that therefore we should not > > introduce it on ShadowRoot either (until we either revisit the > > DocumentFragment decision or someone shows that decision is not > > applicable to ShadowRoot somehow). > > Ah, got it. Well... The innerHTML is necessary for ShadowRoot. It's > not a matter of API taste or consistency. If you look at any shadow > DOM code today (however experimental), you'll see most of it using > innerHTML to populate the shadow tree. FWIW, one of the the most common use of doc fragment implies inserting a div into it to be able to use the div's innerHTML. For example, in jQuery: https://github.com/jquery/jquery/blob/master/src/manipulation.js#L452-L457 --tobie