<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>18732</bug_id>
          
          <creation_ts>2012-08-29 00:56:57 +0000</creation_ts>
          <short_desc>[Custom]: element upgrade algorithm does not preserve attributes and children</short_desc>
          <delta_ts>2012-10-29 22:03:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Component Model</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>18720</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Steve Orvell">sorvell</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>bugs</cc>
    
    <cc>danieljb2</cc>
    
    <cc>dominicc</cc>
    
    <cc>sjmiles</cc>
    
    <cc>wchen</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>72958</commentid>
    <comment_count>0</comment_count>
    <who name="Steve Orvell">sorvell</who>
    <bug_when>2012-08-29 00:56:57 +0000</bug_when>
    <thetext>The element upgrade algorithm does not transfer element attributes or existing event listeners to the created element before the element is replaced in the dom tree (section 5.2.4). Also because the node is replaced, any existing reference to the un-upgraded element become stale. 

For these reasons, it may be better to morph the node in place, rather than replacing it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72964</commentid>
    <comment_count>1</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-08-29 06:37:36 +0000</bug_when>
    <thetext>Hmm, this can be tricky.
We don&apos;t want to move event listeners to the new element, because otherwise
the upgrade event wouldn&apos;t be fired.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72965</commentid>
    <comment_count>2</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-08-29 06:39:08 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt;  Also because the node is replaced, any existing
&gt; reference to the un-upgraded element become stale.
 
I don&apos;t understand this comment. What becomes stale?
The old elements are still there is someone keeps reference to them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72973</commentid>
    <comment_count>3</comment_count>
    <who name="Scott Miles">sjmiles</who>
    <bug_when>2012-08-29 17:14:03 +0000</bug_when>
    <thetext>My understanding is that, If my document looks like this:

  &lt;x-element important=&quot;important&quot;&gt;&lt;span&gt;important goodies&lt;/span&gt;&lt;/x-element&gt;

and my code does:

  x = document.querySelector(&quot;x-element&quot;);
  x.addEventListener(&quot;onclick&quot;, clickAction);

if the upgrade algorithm runs after the above code, the following effects occur:

- the original x-element is replaced in DOM
- the new x-element has no onclick
- the new x-element has no &apos;important&apos; attribute
- x-element&apos;s original children are lost (not in DOM)
- the x reference refers to a node that&apos;s no longer in DOM

The &apos;onclick&apos; is lost (the old element is not in DOM, the new element doesn&apos;t have that event). Any attempt to use the x reference to work with DOM will simply not work (that node is not in DOM). Any query for &apos;important&apos; x-elements will not include the new element.

It&apos;s true that &apos;x&apos; still references a node, but I don&apos;t see how it&apos;s useful. That node is dangling and really should be GC&apos;d asap.

I believe the alternative Steve mentions is to upgrade the element &apos;in place&apos; my modifying it&apos;s prototype and performing the rest of the upgrade steps on this original element. In this case, the attributes, listeners, and references are intact. This solution is also not ideal because we lose whatever the native constructor would have done to the replacement element.

In any case, if the upgrade event is migrated to the new object, can&apos;t the event simply be fired on the new object?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72983</commentid>
    <comment_count>4</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-08-29 18:27:03 +0000</bug_when>
    <thetext>From https://bugzilla.mozilla.org/show_bug.cgi?id=783129:

(In reply to Dimitri Glazkov from comment #13)
&gt; Yes, will fix this shortly:
&gt; https://www.w3.org/Bugs/Public/show_bug.cgi?id=18732
&gt; 
&gt; My thinking is that we transplant attributes and children only, not event
&gt; listeners.

What&apos;s your thinking on how folks can go about baking default event listeners into custom elements? Is the upgrade event able to be defined on the prototype so that listeners can be added to all upgraded nodes of a certain type without a separate code block from the custom element definition?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72985</commentid>
    <comment_count>5</comment_count>
    <who name="William Chen">wchen</who>
    <bug_when>2012-08-29 18:35:34 +0000</bug_when>
    <thetext>Why don&apos;t we want to transplant event listeners? It seems like there is some concern about the upgrade event, but as Scott mentioned, I don&apos;t see why we can&apos;t just fire it on the new element.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72991</commentid>
    <comment_count>6</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-08-29 19:38:18 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; Why don&apos;t we want to transplant event listeners? It seems like there is some
&gt; concern about the upgrade event, but as Scott mentioned, I don&apos;t see why we
&gt; can&apos;t just fire it on the new element.

We could, but they may not do what the user intended. For example:

this.addEventListener(&apos;click&apos;, method.bind(this));

when transplanted, will still be acting on the old element. Is this a Real Concern (tm)?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72994</commentid>
    <comment_count>7</comment_count>
    <who name="Scott Miles">sjmiles</who>
    <bug_when>2012-08-29 19:52:19 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #5)
&gt; &gt; Why don&apos;t we want to transplant event listeners? It seems like there is some
&gt; &gt; concern about the upgrade event, but as Scott mentioned, I don&apos;t see why we
&gt; &gt; can&apos;t just fire it on the new element.
&gt; 
&gt; We could, but they may not do what the user intended. For example:
&gt; 
&gt; this.addEventListener(&apos;click&apos;, method.bind(this));
&gt; 
&gt; when transplanted, will still be acting on the old element. Is this a Real
&gt; Concern (tm)?

If user didn&apos;t bind it, the method would be called on &apos;this&apos; anyway, so presumably the user is doing this specifically to force the callback to fire on the current &apos;this&apos; in the face of event-listener transplantation. I figure he gets what he wants in this case.

I suppose if a user does that binding without thinking about it, it could be a foot-gun.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73000</commentid>
    <comment_count>8</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-08-29 21:01:12 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; We could, but they may not do what the user intended. For example:
&gt; 
&gt; this.addEventListener(&apos;click&apos;, method.bind(this));
&gt; 
&gt; when transplanted, will still be acting on the old element. Is this a Real
&gt; Concern (tm)?
It is</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73001</commentid>
    <comment_count>9</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-08-29 21:05:41 +0000</bug_when>
    <thetext>I&apos;d rather have some dictionary passed to register and it would contain
the listeners which would be automatically registered.


Something like

document.register(&quot;foobarelement&quot;, {
  prototype: HTMLSpanElement,
  listeners: {
    click: function(evt) { /*do something*/ },
    mouseover: function(evt) { /* do something else*/ };
  }
})



(And please don&apos;t say webkit&apos;s memory management can&apos;t handle that.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73002</commentid>
    <comment_count>10</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-08-29 21:09:12 +0000</bug_when>
    <thetext>(In reply to comment #9)
&gt; I&apos;d rather have some dictionary passed to register and it would contain
&gt; the listeners which would be automatically registered.
&gt; 
&gt; 
&gt; Something like
&gt; 
&gt; document.register(&quot;foobarelement&quot;, {
&gt;   prototype: HTMLSpanElement,
&gt;   listeners: {
&gt;     click: function(evt) { /*do something*/ },
&gt;     mouseover: function(evt) { /* do something else*/ };
&gt;   }
&gt; })
&gt; 

Sweet. That should really cut down on the amount of things that we have to do in &quot;created&quot; callback.

&gt; (And please don&apos;t say webkit&apos;s memory management can&apos;t handle that.)

If it can&apos;t, we&apos;ll treat is a bug :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73003</commentid>
    <comment_count>11</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-08-29 21:10:04 +0000</bug_when>
    <thetext>(In reply to comment #10)
&gt; (In reply to comment #9)
&gt; &gt; I&apos;d rather have some dictionary passed to register and it would contain
&gt; &gt; the listeners which would be automatically registered.
&gt; &gt; 
&gt; &gt; 
&gt; &gt; Something like
&gt; &gt; 
&gt; &gt; document.register(&quot;foobarelement&quot;, {
&gt; &gt;   prototype: HTMLSpanElement,
&gt; &gt;   listeners: {
&gt; &gt;     click: function(evt) { /*do something*/ },
&gt; &gt;     mouseover: function(evt) { /* do something else*/ };
&gt; &gt;   }
&gt; &gt; })
&gt; &gt; 
&gt; 
&gt; Sweet. That should really cut down on the amount of things that we have to do
&gt; in &quot;created&quot; callback.

Oh. One problem -- how do I bind a listener to specific instance? I guess I can&apos;t, but that&apos;s what the &quot;created&quot; callback is for :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73004</commentid>
    <comment_count>12</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-08-29 21:12:00 +0000</bug_when>
    <thetext>Though, hmm, what happens if .register is called again with the same
element name, but different options.

Should we let only one .register call per element name? That might make
certain things easier.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73005</commentid>
    <comment_count>13</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-08-29 21:13:26 +0000</bug_when>
    <thetext>(In reply to comment #11)
&gt; Oh. One problem -- how do I bind a listener to specific instance? I guess I
&gt; can&apos;t, but that&apos;s what the &quot;created&quot; callback is for :)

Why you need to bind. I was thinking &apos;this&apos; would be correct.
Effectively when the element is created, 
element.addEventListener(&quot;click&quot;, options.listeners.click) would be called.
(Might need some flag for capturing too)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73006</commentid>
    <comment_count>14</comment_count>
    <who name="Scott Miles">sjmiles</who>
    <bug_when>2012-08-29 21:14:18 +0000</bug_when>
    <thetext>(In reply to comment #11)
&gt; (In reply to comment #10)
&gt; &gt; (In reply to comment #9)
&gt; &gt; &gt; I&apos;d rather have some dictionary passed to register and it would contain
&gt; &gt; &gt; the listeners which would be automatically registered.
&gt; &gt; &gt; 
&gt; &gt; &gt; 
&gt; &gt; &gt; Something like
&gt; &gt; &gt; 
&gt; &gt; &gt; document.register(&quot;foobarelement&quot;, {
&gt; &gt; &gt;   prototype: HTMLSpanElement,
&gt; &gt; &gt;   listeners: {
&gt; &gt; &gt;     click: function(evt) { /*do something*/ },
&gt; &gt; &gt;     mouseover: function(evt) { /* do something else*/ };
&gt; &gt; &gt;   }
&gt; &gt; &gt; })
&gt; &gt; &gt; 
&gt; &gt; 
&gt; &gt; Sweet. That should really cut down on the amount of things that we have to do
&gt; &gt; in &quot;created&quot; callback.
&gt; 
&gt; Oh. One problem -- how do I bind a listener to specific instance? I guess I
&gt; can&apos;t, but that&apos;s what the &quot;created&quot; callback is for :)

(In reply to comment #9)
&gt; I&apos;d rather have some dictionary passed to register and it would contain
&gt; the listeners which would be automatically registered.
&gt; 
&gt; 
&gt; Something like
&gt; 
&gt; document.register(&quot;foobarelement&quot;, {
&gt;   prototype: HTMLSpanElement,
&gt;   listeners: {
&gt;     click: function(evt) { /*do something*/ },
&gt;     mouseover: function(evt) { /* do something else*/ };
&gt;   }
&gt; })
&gt; 
&gt; 
&gt; 
&gt; (And please don&apos;t say webkit&apos;s memory management can&apos;t handle that.)

(In reply to comment #11)
&gt; (In reply to comment #10)
&gt; &gt; (In reply to comment #9)
&gt; &gt; &gt; I&apos;d rather have some dictionary passed to register and it would contain
&gt; &gt; &gt; the listeners which would be automatically registered.
&gt; &gt; &gt; 
&gt; &gt; &gt; 
&gt; &gt; &gt; Something like
&gt; &gt; &gt; 
&gt; &gt; &gt; document.register(&quot;foobarelement&quot;, {
&gt; &gt; &gt;   prototype: HTMLSpanElement,
&gt; &gt; &gt;   listeners: {
&gt; &gt; &gt;     click: function(evt) { /*do something*/ },
&gt; &gt; &gt;     mouseover: function(evt) { /* do something else*/ };
&gt; &gt; &gt;   }
&gt; &gt; &gt; })
&gt; &gt; &gt; 
&gt; &gt; 
&gt; &gt; Sweet. That should really cut down on the amount of things that we have to do
&gt; &gt; in &quot;created&quot; callback.
&gt; 
&gt; Oh. One problem -- how do I bind a listener to specific instance? I guess I
&gt; can&apos;t, but that&apos;s what the &quot;created&quot; callback is for :)

Events are normally automatically called in instance scope, yeah? &apos;this&apos; inside click should refer to the target element unless somebody done explicit bindings.

But in any case, seems to me &apos;how to attach default listeners&apos; is another topic. 

What I&apos;m concerned about is this: Bob the developer writes:

&lt;x-awesome onclick=&quot;awesomeClick()&quot;&gt;&lt;/x-awesome&gt;

I&apos;m 99.9% sure Bob wants that method to fire when that node is clicked, and
that he should not be concerned with how x-awesome is actually instantiated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73008</commentid>
    <comment_count>15</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-08-29 21:18:47 +0000</bug_when>
    <thetext>(In reply to comment #14)
&gt; What I&apos;m concerned about is this: Bob the developer writes:
&gt; 
&gt; &lt;x-awesome onclick=&quot;awesomeClick()&quot;&gt;&lt;/x-awesome&gt;
&gt; 
&gt; I&apos;m 99.9% sure Bob wants that method to fire when that node is clicked, and
&gt; that he should not be concerned with how x-awesome is actually instantiated.


That would work because onclick is just an attribute which is cloned.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73009</commentid>
    <comment_count>16</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-08-29 21:21:00 +0000</bug_when>
    <thetext>In other words I think replace with .register should
mean the same as clone() + replace() and then
adding possibly some default event listener stuff.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73010</commentid>
    <comment_count>17</comment_count>
    <who name="Scott Miles">sjmiles</who>
    <bug_when>2012-08-29 21:22:48 +0000</bug_when>
    <thetext>(In reply to comment #15)
&gt; (In reply to comment #14)
&gt; &gt; What I&apos;m concerned about is this: Bob the developer writes:
&gt; &gt; 
&gt; &gt; &lt;x-awesome onclick=&quot;awesomeClick()&quot;&gt;&lt;/x-awesome&gt;
&gt; &gt; 
&gt; &gt; I&apos;m 99.9% sure Bob wants that method to fire when that node is clicked, and
&gt; &gt; that he should not be concerned with how x-awesome is actually instantiated.
&gt; 
&gt; 
&gt; That would work because onclick is just an attribute which is cloned.

Sorry, I was trying to by succinct, but it was just confusing.

I meant to echo my original example where the user has done this:

x = document.querySelector(&quot;x-awesome&quot;);
x.addEventListener(&quot;onclick&quot;, awesomeClick);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73015</commentid>
    <comment_count>18</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-08-29 21:29:31 +0000</bug_when>
    <thetext>(In reply to comment #17)
&gt; I meant to echo my original example where the user has done this:
&gt; 
&gt; x = document.querySelector(&quot;x-awesome&quot;);
&gt; x.addEventListener(&quot;onclick&quot;, awesomeClick);


Well, in that case the default listener would be fine.
And btw, it is click, not onclick ;)

There is the upgrade event, which dev could use to add necessary listeners.
In fact, I&apos;d say listener shouldn&apos;t added to the element before it is the
right kind of element (document.register is called).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73016</commentid>
    <comment_count>19</comment_count>
    <who name="Scott Miles">sjmiles</who>
    <bug_when>2012-08-29 21:34:34 +0000</bug_when>
    <thetext>(In reply to comment #18)
&gt; (In reply to comment #17)
&gt; &gt; I meant to echo my original example where the user has done this:
&gt; &gt; 
&gt; &gt; x = document.querySelector(&quot;x-awesome&quot;);
&gt; &gt; x.addEventListener(&quot;onclick&quot;, awesomeClick);
&gt; 
&gt; 
&gt; Well, in that case the default listener would be fine.
&gt; And btw, it is click, not onclick ;)
&gt; 
&gt; There is the upgrade event, which dev could use to add necessary listeners.
&gt; In fact, I&apos;d say listener shouldn&apos;t added to the element before it is the
&gt; right kind of element (document.register is called).

I understand, but again I&apos;m concerned about average developer.

He starts with

&lt;x-awesome onclick=&quot;awesomeClick()&quot;&gt;&lt;/x-awesome&gt;

Then somebody tells him it&apos;s a security issue, so he changes it to do

x = document.querySelector(&quot;x-awesome&quot;);
x.addEventListener(&quot;click&quot;, awesomeClick);

Then his page doesn&apos;t work, and now he has to go look up about custom elements and do things differently because &apos;custom elements are weird&apos;.

In general, I want consumers of custom-elements to need to require as little arcana as possible.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73027</commentid>
    <comment_count>20</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-08-29 22:54:03 +0000</bug_when>
    <thetext>(In reply to comment #19)
&gt; I understand, but again I&apos;m concerned about average developer.
&gt; 
&gt; He starts with
&gt; 
&gt; &lt;x-awesome onclick=&quot;awesomeClick()&quot;&gt;&lt;/x-awesome&gt;
&gt; 
&gt; Then somebody tells him it&apos;s a security issue, so he changes it to do
&gt; 
&gt; x = document.querySelector(&quot;x-awesome&quot;);
&gt; x.addEventListener(&quot;click&quot;, awesomeClick);
&gt; 
&gt; Then his page doesn&apos;t work, and now he has to go look up about custom elements
&gt; and do things differently because &apos;custom elements are weird&apos;.
&gt; 
&gt; In general, I want consumers of custom-elements to need to require as little
&gt; arcana as possible.

I can see the value of this argument. Olli, WDYT?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73043</commentid>
    <comment_count>21</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-08-30 03:50:31 +0000</bug_when>
    <thetext>If we copy event listeners based on that arguments, we should copy also
all the expando properties.
And I don&apos;t want either one.
I prefer simple APIs which use as much existing infrastructure as possible.
So, clone() + replace() + whatever defaults the options has is what I&apos;d
prefer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73065</commentid>
    <comment_count>22</comment_count>
    <who name="Daniel Buchner">danieljb2</who>
    <bug_when>2012-08-30 14:54:22 +0000</bug_when>
    <thetext>(In reply to comment #21)
&gt; If we copy event listeners based on that arguments, we should copy also
&gt; all the expando properties.
&gt; And I don&apos;t want either one.
&gt; I prefer simple APIs which use as much existing infrastructure as possible.
&gt; So, clone() + replace() + whatever defaults the options has is what I&apos;d
&gt; prefer.

After consideration, I agree that we should *not* copy event listeners for a few reasons:

- Node.clone(), even with the deep arg set to true, does not do this. The expectation of this clone/replace would be symmetric with that existing, similar interface.

- Presumably (step in if this is not the case Dimitri) a developer would just add any default event listeners that must be strictly bound to the inflated custom element inside the upgrade event the recieve.

- Due to the rise of event delegation techniques to near-ubiquitous status in the developer community (I can&apos;t recall a single popular JS framework that doesn&apos;t use it), many of these even situations have become non-issues.

- Scott brings up a developer expectation mismatch that I at first agreed with, but after further thinking, do not believe is an issue. The fact is, this is a pretty advanced web API - it is unlikely folks with only basic-to-novice level understanding of HTML will ever get stumble across a situation where they&apos;re dealing with custom elements. Consider this: If you have gotten to a point where you even know to write &lt;x-foo&gt; you probably have a working understanding of custom elements. I&apos;d rather defer to the educational power of web API socializers and evangelists here to get the word out that the clone()-ish node replacement done here behaves the same way the existing Node.clone() interface does.

That&apos;s my 2 cents :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73077</commentid>
    <comment_count>23</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-08-30 18:06:55 +0000</bug_when>
    <thetext>(In reply to comment #22)

To make progress:

1) will spec without copying event listeners
2) split off a bug to consider copying event listeners. We can continue debating there :)

Good?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73197</commentid>
    <comment_count>24</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2012-09-04 20:46:55 +0000</bug_when>
    <thetext>(In reply to comment #23)
&gt; (In reply to comment #22)
&gt; 
&gt; To make progress:
&gt; 
&gt; 1) will spec without copying event listeners
&gt; 2) split off a bug to consider copying event listeners. We can continue
&gt; debating there :)
&gt; 
&gt; Good?

Good. Bug #?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77327</commentid>
    <comment_count>25</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-10-29 21:29:23 +0000</bug_when>
    <thetext>(In reply to comment #24)

&gt; Good. Bug #?

Filed bug 19763 to debate copying event listeners.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77333</commentid>
    <comment_count>26</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-10-29 22:03:51 +0000</bug_when>
    <thetext>http://dvcs.w3.org/hg/webcomponents/rev/9972306cd9eb</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>