W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

Re: Element.create(): a proposal for more convenient element creation

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 03 Aug 2011 09:34:10 +0200
To: "Glenn Maynard" <glenn@zewt.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "Aryeh Gregor" <ayg@aryeh.name>, "Maciej Stachowiak" <mjs@apple.com>, "WebApps WG" <public-webapps@w3.org>
Message-ID: <op.vzmna8vi64w2qv@annevk-macbookpro.local>
On Tue, 02 Aug 2011 20:31:04 +0200, Tab Atkins Jr. <jackalmage@gmail.com>  
> On Tue, Aug 2, 2011 at 11:26 AM, Glenn Maynard <glenn@zewt.org> wrote:
>> On Tue, Aug 2, 2011 at 2:18 PM, Tab Atkins Jr. <jackalmage@gmail.com>  
>> wrote:
>>> MooTools is basically identical to Prototype, except that you can
>>> additionally set listeners on the element during creation by using a
>>> magical "events" property in the attribute bag, which takes an object
>>> of event names and functions.  This would be nice to look into adding.
>> Is this much better than just saying eg. Element.create("a", {href:
>> "http://link", onclick: function(e) { ... } }, "link"}?
> Hmm, is everything exposed as on* attributes now?  If so, then yeah,
> just do that; no need to mess around with a magic property in the
> attributes bag.

This would still be magical as it is setting an IDL attribute rather than  
a content attribute.

Anne van Kesteren
Received on Wednesday, 3 August 2011 07:34:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:23 UTC