This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Does it affect the new elements, created from this definition? Must not affect existing ones.
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.
(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.
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.
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?)
<element> will be one-shot.