This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 18608 - [Templates] Specify that all template elements within a document have DF's that are owned by a shared browsing-context-less document
Summary: [Templates] Specify that all template elements within a document have DF's th...
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 15476
  Show dependency treegraph
 
Reported: 2012-08-17 21:03 UTC by Rafael Weinstein
Modified: 2012-10-03 22:16 UTC (History)
3 users (show)

See Also:


Attachments

Description Rafael Weinstein 2012-08-17 21:03:46 UTC
The following:

"Prior to first access, the content property must be initialized in a way that is equivalent to processing these steps:

Input
TEMPLATE, the template
Output
CONTENTS, the template contents
Let DOCUMENT be a new Document node that does not have a browsing context
Mark DOCUMENT as an HTML document
Let CONTENTS be a new DocumentFragment object whose node document is DOCUMENT"

Implies 

template.contents.ownerDocument !== template2.contents.ownerDocument

for any two distinct template elements.

This seems needlessly expensive. I propose something equivalent to:

-Event document which *has a browsing context* owns another (lazily created) "inert document" which lacks a browsing context. When a template element creates it's content document fragment it assigns it's node (owner) document as follows:

If template.ownerDocument has a browsing context, use that document's "inert document"
else use the template.ownerDocument.