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 17113 - [Custom]: What happens when you remove or change contents of <element>?
Summary: [Custom]: What happens when you remove or change contents of <element>?
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: 18719
  Show dependency treegraph
 
Reported: 2012-05-18 21:26 UTC by Dimitri Glazkov
Modified: 2013-05-17 22:45 UTC (History)
1 user (show)

See Also:


Attachments

Description Dimitri Glazkov 2012-05-18 21:26:02 UTC
Does it affect the new elements, created from this definition?

Must not affect existing ones.
Comment 1 Dominic Cooney 2012-05-22 06:48:03 UTC
I think we should follow <script> here. Like a <script> tag, once the element has been processed, subsequent changes should not have any effect; removing and reinserting it into the document should not have any effect.
Comment 2 Dimitri Glazkov 2012-05-23 17:01:13 UTC
(In reply to comment #1)
> I think we should follow <script> here. Like a <script> tag, once the element
> has been processed, subsequent changes should not have any effect; removing and
> reinserting it into the document should not have any effect.

I disagree. Script is not being actively reused. It runs and then it's done. When you stamp out a new element, you effectively reuse the template and the attributes on the HTMLElementElement. I think it's more similar to <style> than to <script> in this respect.
Comment 3 Dominic Cooney 2012-05-29 01:26:18 UTC
I guess I’m concerned with what the constructor attribute does when changed – does it remove the binding for the old constructor and create a new one? Just create a new one?

I expect the behavior you choose for that one will differ from the rest of the element (eg template, etc.) So the "one and done" model is consistent, at least.

It does feel very webby-JavaScripty to have changes reflected live though.
Comment 4 Dimitri Glazkov 2012-12-12 00:02:32 UTC
If you add a new <script> to <element>, it runs immediately, as specified. This won't hurt anything, and actually could be useful if author decides to have incremental/partial initialization of component (aspects/mixins ftw?)
Comment 5 Dimitri Glazkov 2013-05-17 22:45:45 UTC
<element> will be one-shot.