- From: Charles Pritchard <chuck@jumis.com>
- Date: Mon, 1 Aug 2011 23:25:23 -0700
- To: Ian Hickson <ian@hixie.ch>
- Cc: João Eiras <joao.eiras@gmail.com>, WebApps WG <public-webapps@w3.org>
On Aug 1, 2011, at 9:25 PM, Ian Hickson <ian@hixie.ch> wrote: > On Tue, 2 Aug 2011, João Eiras wrote: >> >> While the idea is interesting, "create" is a too simple name to add on >> something as polluted as Element. > > Why? > > I think create() is fine. It's a pretty common name for a factory or > constructor (in languages with named constructors), and having it on the > interface object makes it pretty clear what it's a factory for. If we can get this chained, the .attr({key:val}) syntax is handy at times, too, if / when applied to existing items. At that point, it's very similar to the popular helpers out there, esp, jQuery. One nice aspect of that is that those package maintainers can feature test for the native model, even if it's a long-name to type. Might slightly (very slightly) improve performance in such code bases.
Received on Tuesday, 2 August 2011 06:26:11 UTC