Re: [webcomponents]: Re-imagining shadow root as Element

So, what you quoted are thoughts I already deprecated mysefl in this
thread. :)

If you read a bit further, see that  I realized that <shadow-root> is
really part of the 'outer html' of the node and not the inner html.

>> I think that is actually a feature, not a detriment and easily
explainable.

What is actually a feature? You mean that the shadow root is invisible to
innerHTML?

Yes, that's true. But without some special handling of Shadow DOM you get
into trouble when you start using innerHTML to serialize DOM into HTML and
transfer content from A to B. Or even from A back to itself.

Again, treating (non intrinsic) Shadow DOM as outerHTML solves this problem
IMO.

Scott


On Wed, Apr 10, 2013 at 10:11 AM, Brian Kardell <bkardell@gmail.com> wrote:

> On Mon, Mar 18, 2013 at 5:05 PM, Scott Miles <sjmiles@google.com> wrote:
> > I'm already on the record with A, but I have a question about
> 'lossiness'.
> >
> > With my web developer hat on, I wonder why I can't say:
> >
> > <div id="foo">
> >   <shadowroot>
> >     shadow stuff
> >   </shadowroot>
> >
> >   light stuff
> >
> > </div>
> >
> >
> > and then have the value of #foo.innerHTML still be
> >
> >   <shadowroot>
> >      shadow stuff
> >   </shadowroot>
> >
> >   lightstuff
> >
> > I understand that for DOM, there is a wormhole there and the reality of
> what
> > this means is new and frightening; but as a developer it seems to be
> > perfectly fine as a mental model.
> >
> > We web devs like to grossly oversimplify things. :)
> >
> > Scott
>
> I am also a Web developer and I find that proposal (showing in
> innerHTML) feels really wrong/unintuitive to me... I think that is
> actually a feature, not a detriment and easily explainable.
>
> I am in a) camp
>

Received on Wednesday, 10 April 2013 17:24:49 UTC