- From: Cameron McCormack <cam@mcc.id.au>
- Date: Sun, 26 Feb 2006 11:46:26 +1100
- To: "Web APIs WG (public)" <public-webapi@w3.org>
Ian Hickson: > * Having an interface doesn't imply behaviour -- e.g. NodeList doesn't > imply that NodeList is live. You can have an object that implemnets > NodeList and is not live. Except that DOM 3 says: The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live. and I'd say that NodeList objects returned by a getElementsBySelector() would be "in the DOM". > * IMHO getElementsBySelector() should return a live list, just like > getElementsByTagName. Agreed. > * I would recommend against supporting namespaces in the first version, > for simplicity. I think it is important for anything other than plain HTML, especially CDF, to support namespaces from the outset. > * I would recommend having getElementsBySelector and > getElementsBySelectorNS if you wanted to support both, rather than using > optional arguments. Some languages don't support method overloading on > argument signatures and would need different numbers of arguments anyway. What would happen if you called getElementsBySelector with a selector that included a namespace? > * IMHO the method should not raise an exception when the selector contains > a pseudo-element. It should would return an empty list. What is wrong with something like 'svg|g > *:first-child'? That could still match an element, so it should be in the returned NodeList. -- Cameron McCormack ICQ: 26955922 cam (at) mcc.id.au MSN: cam (at) mcc.id.au http://mcc.id.au/ JBR: heycam (at) jabber.org
Received on Sunday, 26 February 2006 00:46:34 UTC