Re: [DOM4] NodeList should be deprecated

2012-03-16 Thread Ojan Vafai
On Wed, Mar 14, 2012 at 5:32 AM, Anne van Kesteren ann...@opera.com wrote: On Wed, 14 Mar 2012 09:03:23 +0100, Cameron McCormack c...@mcc.id.au 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

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

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 the

Re: [DOM4] NodeList should be deprecated

2012-03-14 Thread Anne van Kesteren
On Wed, 14 Mar 2012 03:44:16 +0100, Cameron McCormack c...@mcc.id.au 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

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 09:03:23 +0100, Cameron McCormack c...@mcc.id.au 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,

Re: [DOM4] NodeList should be deprecated

2012-03-13 Thread Anne van Kesteren
On Mon, 12 Mar 2012 21:06:00 +0100, Rick Waldron waldron.r...@gmail.com wrote: On Mar 12, 2012, at 3:06 PM, Anne van Kesteren ann...@opera.com wrote: On Mon, 12 Mar 2012 19:07:31 +0100, Rick Waldron waldron.r...@gmail.com wrote: The NodeList item() method is a blocker. Blocker in what

Re: [DOM4] NodeList should be deprecated

2012-03-13 Thread Rick Waldron
On Mar 13, 2012, at 4:29 AM, Anne van Kesteren ann...@opera.com wrote: On Mon, 12 Mar 2012 21:06:00 +0100, Rick Waldron waldron.r...@gmail.com wrote: On Mar 12, 2012, at 3:06 PM, Anne van Kesteren ann...@opera.com wrote: On Mon, 12 Mar 2012 19:07:31 +0100, Rick Waldron

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

Re: [DOM4] NodeList should be deprecated

2012-03-13 Thread Rick Waldron
On Tue, Mar 13, 2012 at 10:24 PM, Ojan Vafai o...@chromium.org 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

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-12 Thread Adam Klein
On Thu, Mar 8, 2012 at 11:57 PM, Anne van Kesteren ann...@opera.com wrote: On Thu, 08 Mar 2012 23:24:45 +0100, Ojan Vafai o...@chromium.org wrote: Dynamic NodeLists have a significant memory and performance cost. Static NodeLists are basically just under-powered arrays. We should just return

Re: [DOM4] NodeList should be deprecated

2012-03-12 Thread Rick Waldron
On Mon, Mar 12, 2012 at 2:00 PM, Adam Klein ad...@chromium.org wrote: On Thu, Mar 8, 2012 at 11:57 PM, Anne van Kesteren ann...@opera.comwrote: On Thu, 08 Mar 2012 23:24:45 +0100, Ojan Vafai o...@chromium.org wrote: Dynamic NodeLists have a significant memory and performance cost. Static

Re: [DOM4] NodeList should be deprecated

2012-03-12 Thread Anne van Kesteren
On Mon, 12 Mar 2012 19:07:31 +0100, Rick Waldron waldron.r...@gmail.com 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 Mar 12, 2012, at 3:06 PM, Anne van Kesteren ann...@opera.com wrote: On Mon, 12 Mar 2012 19:07:31 +0100, Rick Waldron waldron.r...@gmail.com wrote: The NodeList item() method is a blocker. Blocker in what way? As I've always understood it - the item() method is what differentiates

Re: [DOM4] NodeList should be deprecated

2012-03-08 Thread Anne van Kesteren
On Thu, 08 Mar 2012 23:24:45 +0100, Ojan Vafai o...@chromium.org 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