- From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
- Date: Mon, 19 Oct 2009 13:50:36 +0200
- To: Anne van Kesteren <annevk@opera.com>
- CC: Adrian Bateman <adrianba@microsoft.com>, Jonas Sicking <jonas@sicking.cc>, "Tab Atkins Jr." <jackalmage@gmail.com>, Tony Ross <tross@microsoft.com>, "public-html@w3.org" <public-html@w3.org>
Anne van Kesteren On 09-10-19 13.02: > On Sun, 18 Oct 2009 21:42:54 +0200, Adrian Bateman > <adrianba@microsoft.com> wrote: >> I meant something like <widget:datepicker>, <widget:menubar>, >> <widget:treecontrol>. This seems fairly common in JavaScript control >> libraries and finding all instances of controls provided by the library >> is necessary. Page start-up performance for this kind of behaviour is >> important. Something like this is where you might also want to style >> across elements with CSS as Tony suggested. Of course, this is only one >> of the suggested use cases but I think it's a reasonably compelling one. > > FWIW, I believe in quite a few engines class names would be even more > performant. With getElementsByClassName() (not yet in IE I believe) you'd > also have a convenient way to get them. They would also work better if you > have e.g. child nodes that you do not want to see returned in the > collection. > > For a set of element names you could also use querySelector(). I don't know what will be most "performant", but I don't think the primary argument for namespaces from either Adrian or Tony has been performance speed. That is not the only concern for authors, anyway. Of course, if an important UA doesn't react to namespaces or namespaces aren't "performant" enough, then one must add classes etc. Authors do a lot to make up for unperforming user agents. But maintaining an up-to-date document with all class names in place in all the necessary places, is more demanding for authors, than using powerful selectors that are able to select the already present data structure. Perhaps, as one of the editors of Namespaces in CSS[1], you are also able to tell us that namespaces have some advantages? [1] http://www.w3.org/TR/css3-namespace/ -- leif halvard silli
Received on Monday, 19 October 2009 11:51:10 UTC