On Tue, Jan 7, 2014 at 2:42 PM, Elliott Sprehn <espr...@gmail.com> wrote: > On Tue, Oct 29, 2013 at 4:20 AM, Anne van Kesteren <ann...@annevk.nl> wrote: >> On Tue, Oct 29, 2013 at 7:34 AM, Simon Pieters <sim...@opera.com> wrote: >> > On Tue, 29 Oct 2013 00:54:05 +0100, Anne van Kesteren <ann...@annevk.nl> >> > wrote: >> >> We are considering not throwing in XML. >> > >> > Only on getting innerHTML, though, right? >> >> Oh I missed that. In that case throwing if you include text nodes for >> ShadowRoot nodes is not too bad. And would match what happens if you >> append a DocumentFragment that contains them which is the same >> operation. Sounds good. > > > I've been pondering this more recently and I think we want to just silently > drop the Text nodes instead. If you do > shadowRoot.appendChild(template.contents) and the author did: > > <template> > <div>header</div> > <div>content</div> > </template> > > We're going to throw an exception for all the Text between the elements > which is not really what the author wanted (or realized they were doing). > > If dropping them is too gross we might want to just consider this a lost > cause and warn authors away from putting text in there due to the issues I > outlined in my original email.
Alternately: silently drop whitespace, but still throw on significant text? ~TJ