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 way?


As I've always understood it - the item() method is what differentiates  
NodeList from Array and blocks it from being just an array.


Is this incorrect?


I think there is more, such as arrays being mutable, but the suggestion  
was to change two accessors from mutation observers to return platform  
array objects rather than NodeLists, which is a change we can still make  
given that mutation observers is not widely deployed yet.



--
Anne van Kesteren
http://annevankesteren.nl/



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 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 
 NodeList from Array and blocks it from being just an array.
 
 Is this incorrect?
 
 I think there is more, such as arrays being mutable, but the suggestion was 
 to change two accessors from mutation observers to return platform array 
 objects rather than NodeLists, which is a change we can still make given that 
 mutation observers is not widely deployed yet.

I that case, very cool. Thanks for the clarification.

 
 
 -- 
 Anne van Kesteren
 http://annevankesteren.nl/



RfC: LCWD of Web Workers; deadline April 3

2012-03-13 Thread Arthur Barstow
This is a Request for Commentsfor the March 13 version of the Last Call 
Working Draft of Web Workers:


   http://www.w3.org/TR/2012/WD-workers-20120313/

The comment deadline is April 3 and all comments should be sent to the 
public-webapps@w3.org list.





RfC: LCWD of WebPerf WG's High Resolution Time; deadline April 10

2012-03-13 Thread Arthur Barstow
WebApps has been asked to review the Web Performance WG's High 
Resolution Time LCWD http://www.w3.org/TR/2012/WD-hr-time-20120313/.


Individual WG members are encouraged to provide individual feedback 
directly to the Web Perf WG. If you have comments, please send them to 
the following list by April 10:


   public-web-p...@w3.org@w3.org
   http://lists.w3.org/Archives/Public/public-web-perf/

If anyone in WebApps wants to propose an official WG response, please do 
so ASAP, in reply to this email so the WebApps WG can discuss it.


-Thanks, AB






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 remove on all the Nodes in the NodeList. Also, in theory, browser may
be able to optimize common cases of NodeLists (e.g. cache frequently
accessed NodeLists).

We should make static NodeList inherit from Array though so that you can do
regular array operations on it.

On Tue, Mar 13, 2012 at 5:59 AM, Rick Waldron waldron.r...@gmail.comwrote:


 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 
 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
 NodeList from Array and blocks it from being just an array.
 
  Is this incorrect?
 
  I think there is more, such as arrays being mutable, but the suggestion
 was to change two accessors from mutation observers to return platform
 array objects rather than NodeLists, which is a change we can still make
 given that mutation observers is not widely deployed yet.

 I that case, very cool. Thanks for the clarification.

 
 
  --
  Anne van Kesteren
  http://annevankesteren.nl/



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
 NodeList that operate on Nodes, e.g. add a remove method to NodeList that
 call remove on all the Nodes in the NodeList. Also, in theory, browser may
 be able to optimize common cases of NodeLists (e.g. cache frequently
 accessed NodeLists).

 We should make static NodeList inherit from Array though so that you can
 do regular array operations on it.


In the future, it will be incredibly easy to make a NodeList into an Array
with the spread operator:

[ ...NodeList ]

// [ node, node, node ]

Rick





 On Tue, Mar 13, 2012 at 5:59 AM, Rick Waldron waldron.r...@gmail.comwrote:


 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 
 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 NodeList from Array and blocks it from being just an array.
 
  Is this incorrect?
 
  I think there is more, such as arrays being mutable, but the suggestion
 was to change two accessors from mutation observers to return platform
 array objects rather than NodeLists, which is a change we can still make
 given that mutation observers is not widely deployed yet.

 I that case, very cool. Thanks for the clarification.

 
 
  --
  Anne van Kesteren
  http://annevankesteren.nl/





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.