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 15653 - [Templates]: Specify "liveness" of the elements
Summary: [Templates]: Specify "liveness" of the elements
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:
: 15657 (view as bug list)
Depends on: 16155
Blocks: 15663
  Show dependency treegraph
 
Reported: 2012-01-20 21:34 UTC by Dimitri Glazkov
Modified: 2012-03-08 19:21 UTC (History)
1 user (show)

See Also:


Attachments

Description Dimitri Glazkov 2012-01-20 21:34:21 UTC
Do elements fetch resources, run script, audio? Behavior side effects?
Comment 1 Dimitri Glazkov 2012-01-24 18:30:06 UTC
I think this and bug 15657 can be resolved as part of the following premise:

When an element is in template contents, its properties are detached from the internal state of the element, and instead simply simulate the attribute accessors.

For example, "liveness" of an image only comes into play when you set its "src" property. If the property simply parrots setAttribute/getAttribute and doesn't change internal state of the element, the effect is that the image is never fetched.

Similarly, the tolerance of setting "tabindex" is not significant, since the property is not actually set, and is instead using setAttribute/getAttribute.
Comment 2 Dimitri Glazkov 2012-01-24 21:13:37 UTC
We could do this by:

1) defining that template contents are parsed as a document fragment that was created from a document without a browser context (var df = document.implementation.createHTMLDocument('title').createDocumentFragment();)
2) modifying HTML spec to clarify what HTML elements with a ownerDocument that does not have a browser context should do.

At the moment, the interoperability story is pretty bad here, with Gecko/IE9/WebKit doing slightly different things, Gecko doing the thing that's the closest to desired behavior.
Comment 3 Dimitri Glazkov 2012-01-24 21:15:02 UTC
That's browsing context, not "browser context": http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#browsing-context
Comment 4 Dimitri Glazkov 2012-03-01 18:37:29 UTC
*** Bug 15657 has been marked as a duplicate of this bug. ***
Comment 5 Dimitri Glazkov 2012-03-01 18:53:08 UTC
Added the notion of "inert" in http://dvcs.w3.org/hg/webcomponents/rev/cb6f77f5a6bb.
Comment 6 Dimitri Glazkov 2012-03-08 19:21:24 UTC
template contents initialization algorithm takes care of this: http://dvcs.w3.org/hg/webcomponents/rev/195ce90ed523