- From: Garrett Smith <dhtmlkitchen@gmail.com>
- Date: Sat, 6 Aug 2011 15:54:34 -0700
- To: Charles Pritchard <chuck@jumis.com>
- Cc: Dominic Cooney <dominicc@google.com>, WebApps WG <public-webapps@w3.org>, Jonas Sicking <jonas@sicking.cc>, Maciej Stachowiak <mjs@apple.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, Anne van Kesteren <annevk@opera.com>, Glenn Maynard <glenn@zewt.org>, Aryeh Gregor <ayg@aryeh.name>
On 8/6/11, Charles Pritchard <chuck@jumis.com> wrote: > On 8/6/2011 9:05 AM, Dominic Cooney wrote: >> Element.create looks neat. Three thoughts: > ... >> Let me briefly reiterate that I think we want *both* Element.create >> and constructors; they have complementary uses. > I agree. And for no reason, it seems. > >> >> Second, re: setAttribute vs setting properties, there might be types >> other than functions we want to not treat as strings; for example if a >> UA implements CSSOM it might be nice to be able to set a style without >> having to serialize and reparse the CSSStyleDeclaration. >> >> Can we spec whether something in the attributes hash is set via >> setAttribute or via setting a property based on the IDL for that element? > How about .attributes as another reserved word: > > Element.create('div', { attributes: { 'class': 'foo'} }); > Element.create('div', { attributes: [ 'class','foo','class','bar'] } > ).attr({textContent: 'Bar class'}); > textContent is a property, not an attribute. Properties vs attributes was already explained in this thread. [...] -- Garrett
Received on Saturday, 6 August 2011 22:55:00 UTC