This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The algorithm for creating the content DocumentFragment of templates (http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#template-contents) says in step 2.1 to always create a new Document. But this is not what Gecko or Blink do. The following code returns true on both those engines: t1 = document.createElement('template'); t2 = document.createElement('template'); t.content.ownerDocument === t2.content.ownerDocument
It seems like the concept of "template contents owner" didn't get carried over from the old spec. https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#definitions
Yep. I probably missed this when reviewin Hixie's changes from the stand-alone spec. Apologies. Adam is correct: The original spec (plus WebKit/Blink/Gecko) intentionally avoids creating tons of documents to host template contents. The stand-along spec used the term "template contents owner doc": https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#dfn-template-contents-owner These steps attempt to create the situation where there is at most one owning document per displayed document which contains templates.
Huh, that totally went over my head. I didn't realise the implications of how that was defined. My bad. Fixed.
Checked in as WHATWG revision r8270. Check-in comment: Share the ownerDocument of template contents amongst the templates of a document. http://html5.org/tools/web-apps-tracker?from=8269&to=8270
lgtm. thanks, hixie.