[whatwg] Declarative Inert DOM (e.g. the <template> element)

Tab Atkins Jr. jackalmage at gmail.com
Fri Nov 18 15:54:16 PST 2011


On Fri, Nov 18, 2011 at 3:44 PM, Jonas Sicking <jonas at sicking.cc> wrote:
> Personally it seems to me that moving the elements out of the DOM such
> that you can't find them using gEBI/querySelector/firstChild is more
> surprising than useful.
>
> It would basically reduce the feature to syntax sugar for setting
> .innerHTML on an orphaned <div>. Is that really producing the best
> solution for authors?

No, it's still not syntax sugar.  You still get the lack of attribute
normalization, for example.

Is there a use-case for running .findAll over the document and getting
the contents of templates?  I don't think so, except for convenience
when you *know* you're only going to get the inside-the-template
element.  It's nearly as easy to just grab the template element and
run .findAll over it specifically, and that avoids the possibility of
confusion.

~TJ



More information about the whatwg mailing list