W3C home > Mailing lists > Public > public-webapps-bugzilla@w3.org > August 2012

[Bug 18732] [Custom]: element upgrade algorithm does not preserve attributes, event listeners, references

From: <bugzilla@jessica.w3.org>
Date: Wed, 29 Aug 2012 21:10:05 +0000
Message-Id: <E1T6pWX-0008Ce-3E@jessica.w3.org>
To: public-webapps-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=18732

--- Comment #11 from Dimitri Glazkov <dglazkov@chromium.org> 2012-08-29 21:10:04 UTC ---
(In reply to comment #10)
> (In reply to comment #9)
> > I'd rather have some dictionary passed to register and it would contain
> > the listeners which would be automatically registered.
> > 
> > 
> > Something like
> > 
> > document.register("foobarelement", {
> >   prototype: HTMLSpanElement,
> >   listeners: {
> >     click: function(evt) { /*do something*/ },
> >     mouseover: function(evt) { /* do something else*/ };
> >   }
> > })
> > 
> 
> Sweet. That should really cut down on the amount of things that we have to do
> in "created" callback.

Oh. One problem -- how do I bind a listener to specific instance? I guess I
can't, but that's what the "created" callback is for :)

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Wednesday, 29 August 2012 21:10:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 29 August 2012 21:10:06 GMT