Re: [DOM4] NodeList should be deprecated

2012-03-16 Thread Cameron McCormack
Cameron McCormack: > It is probably not feasible to add to HTMLCollection, because it has a named property getter which is not [OverrideBuiltins]. That means that all the new properties on the prototype like "concat", "push", etc. would begin to shadow any named elements on the collection. On

Re: [DOM4] NodeList should be deprecated

2012-03-16 Thread Cameron McCormack
Anne van Kesteren: > Okay, annotated NodeList with [ArrayClass]. What about HTMLCollection? Should I add it there too? Could you take a look at NodeList and HTMLCollection for accuracy? It is probably not feasible to add to HTMLCollection, because it has a named property getter which is not [O

Re: [DOM4] NodeList should be deprecated

2012-03-16 Thread Ojan Vafai
On Wed, Mar 14, 2012 at 5:32 AM, Anne van Kesteren wrote: > On Wed, 14 Mar 2012 09:03:23 +0100, Cameron McCormack > wrote: > >> Anne van Kesteren: >> >>> Wasn't there a compatibility constrain with doing that? >>> >> >> I don't remember -- the only difference it would make is that >> Object.getP

[DOM4] Question about using sequence v.s., NodeList for (was [DOM4] NodeList should be deprecated )

2012-03-15 Thread Vincent Hardy
Hello, I am working on a proposal (http://wiki.csswg.org/spec/css3-regions/css-om) to update the CSS Regions CSS OM APIs, and one of the changes is to make various lists static. I see that the thread at http://lists.w3.org/Archives/Public/public-webapps/2012JanMar/1068.html stemmed from the CS

Re: [DOM4] NodeList should be deprecated

2012-03-14 Thread Anne van Kesteren
On Wed, 14 Mar 2012 09:03:23 +0100, Cameron McCormack wrote: Anne van Kesteren: Wasn't there a compatibility constrain with doing that? I don't remember -- the only difference it would make is that Object.getPrototypeOf(NodeList.prototype) == Array.prototype. Okay, annotated NodeList wit

Re: [DOM4] NodeList should be deprecated

2012-03-14 Thread Cameron McCormack
Anne van Kesteren: Wasn't there a compatibility constrain with doing that? I don't remember -- the only difference it would make is that Object.getPrototypeOf(NodeList.prototype) == Array.prototype.

Re: [DOM4] NodeList should be deprecated

2012-03-14 Thread Anne van Kesteren
On Wed, 14 Mar 2012 03:44:16 +0100, Cameron McCormack wrote: Ojan Vafai: We should make static NodeList inherit from Array though so that you can do regular array operations on it. Web IDL has the means to make (all) NodeList objects inherit from Array by annotating them with [ArrayClass],

Re: [DOM4] NodeList should be deprecated

2012-03-13 Thread Cameron McCormack
Ojan Vafai: We should make static NodeList inherit from Array though so that you can do regular array operations on it. Web IDL has the means to make (all) NodeList objects inherit from Array by annotating them with [ArrayClass], if we want to do that.

Re: [DOM4] NodeList should be deprecated

2012-03-13 Thread Rick Waldron
On Tue, Mar 13, 2012 at 10:24 PM, Ojan Vafai wrote: > Upon further thought, I take this suggestion back. Static NodeList as it > currently exists is just an underpowered array, but that doesn't mean > that's what it always has to be. In the future, we should add methods to > NodeList that operate

Re: [DOM4] NodeList should be deprecated

2012-03-13 Thread Ojan Vafai
Upon further thought, I take this suggestion back. Static NodeList as it currently exists is just an underpowered array, but that doesn't mean that's what it always has to be. In the future, we should add methods to NodeList that operate on Nodes, e.g. add a remove method to NodeList that call remo

Re: [DOM4] NodeList should be deprecated

2012-03-13 Thread Rick Waldron
On Mar 13, 2012, at 4:29 AM, "Anne van Kesteren" wrote: > On Mon, 12 Mar 2012 21:06:00 +0100, Rick Waldron > wrote: >> On Mar 12, 2012, at 3:06 PM, "Anne van Kesteren" wrote: >>> On Mon, 12 Mar 2012 19:07:31 +0100, Rick Waldron >>> wrote: The NodeList item() method is a blocker. >>> >

Re: [DOM4] NodeList should be deprecated

2012-03-13 Thread Anne van Kesteren
On Mon, 12 Mar 2012 21:06:00 +0100, Rick Waldron wrote: On Mar 12, 2012, at 3:06 PM, "Anne van Kesteren" wrote: On Mon, 12 Mar 2012 19:07:31 +0100, Rick Waldron wrote: The NodeList item() method is a blocker. Blocker in what way? As I've always understood it - the item() method is wha

Re: [DOM4] NodeList should be deprecated

2012-03-12 Thread Rick Waldron
On Mar 12, 2012, at 3:06 PM, "Anne van Kesteren" wrote: > On Mon, 12 Mar 2012 19:07:31 +0100, Rick Waldron > wrote: >> The NodeList item() method is a blocker. > > Blocker in what way? As I've always understood it - the item() method is what differentiates NodeList from Array and blocks it f

Re: [DOM4] NodeList should be deprecated

2012-03-12 Thread Anne van Kesteren
On Mon, 12 Mar 2012 19:07:31 +0100, Rick Waldron wrote: The NodeList item() method is a blocker. Blocker in what way? -- Anne van Kesteren http://annevankesteren.nl/

Re: [DOM4] NodeList should be deprecated

2012-03-12 Thread Rick Waldron
On Mon, Mar 12, 2012 at 2:00 PM, Adam Klein wrote: > On Thu, Mar 8, 2012 at 11:57 PM, Anne van Kesteren wrote: > >> On Thu, 08 Mar 2012 23:24:45 +0100, Ojan Vafai wrote: >> >>> Dynamic NodeLists have a significant memory and performance cost. Static >>> NodeLists are basically just under-powered

Re: [DOM4] NodeList should be deprecated

2012-03-12 Thread Adam Klein
On Thu, Mar 8, 2012 at 11:57 PM, Anne van Kesteren wrote: > On Thu, 08 Mar 2012 23:24:45 +0100, Ojan Vafai wrote: > >> Dynamic NodeLists have a significant memory and performance cost. Static >> NodeLists are basically just under-powered arrays. We should just return >> Node arrays from any new

Re: [DOM4] NodeList should be deprecated

2012-03-08 Thread Anne van Kesteren
On Thu, 08 Mar 2012 23:24:45 +0100, Ojan Vafai wrote: Dynamic NodeLists have a significant memory and performance cost. Static NodeLists are basically just under-powered arrays. We should just return Node arrays from any new APIs that return a list of Nodes. I'd like to see NodeList get simila

[DOM4] NodeList should be deprecated

2012-03-08 Thread Ojan Vafai
Dynamic NodeLists have a significant memory and performance cost. Static NodeLists are basically just under-powered arrays. We should just return Node arrays from any new APIs that return a list of Nodes. I'd like to see NodeList get similar treatment to hasFeature, i.e. a note that it not be used