Re: [whatwg] Proposal: Adding methods like getElementById and getElementsByTagName to DocumentFragments

2013-07-27 Thread Ojan Vafai
On Thu, Jul 25, 2013 at 1:42 PM, Jonas Sicking jo...@sicking.cc wrote: On Thu, Jul 25, 2013 at 9:05 AM, Boris Zbarsky bzbar...@mit.edu wrote: On 7/24/13 10:42 PM, Jussi Kalliokoski wrote: Argh, I had forgotten about live NodeLists. OK, this is a reason that resonates with me and

[whatwg] iterators intead of live NodeLists WAS: Proposal: Adding methods like getElementById and getElementsByTagName to DocumentFragments

2013-07-27 Thread Ojan Vafai
Realized this should probably be a new thread... On Sat, Jul 27, 2013 at 10:58 AM, Ojan Vafai o...@chromium.org wrote: On Thu, Jul 25, 2013 at 1:42 PM, Jonas Sicking jo...@sicking.cc wrote: On Thu, Jul 25, 2013 at 9:05 AM, Boris Zbarsky bzbar...@mit.edu wrote: On 7/24/13 10:42 PM, Jussi

Re: [whatwg] Proposal: Adding methods like getElementById and getElementsByTagName to DocumentFragments

2013-07-27 Thread James Greene
Isn't that what the NodeIterator and TreeWalker DOM APIs were for? Sincerely, James Greene On Jul 27, 2013 12:58 PM, Ojan Vafai o...@chromium.org wrote: On Thu, Jul 25, 2013 at 1:42 PM, Jonas Sicking jo...@sicking.cc wrote: On Thu, Jul 25, 2013 at 9:05 AM, Boris Zbarsky bzbar...@mit.edu

Re: [whatwg] iterators intead of live NodeLists WAS: Proposal: Adding methods like getElementById and getElementsByTagName to DocumentFragments

2013-07-27 Thread James Greene
Isn't that what the NodeIterator and TreeWalker APIs are for? Sincerely, James Greene On Jul 27, 2013 1:25 PM, Ojan Vafai o...@chromium.org wrote: Realized this should probably be a new thread... On Sat, Jul 27, 2013 at 10:58 AM, Ojan Vafai o...@chromium.org wrote: On Thu, Jul 25, 2013

Re: [whatwg] iterators intead of live NodeLists WAS: Proposal: Adding methods like getElementById and getElementsByTagName to DocumentFragments

2013-07-27 Thread Ojan Vafai
There are many places where we expose SequenceNode or NodeList that can't easily be replaced with hand-rolled DOM walking (e.g. getNamedFlows). You could imagine NodeIterator taking a SequenceNode/NodeList as an argument to it's constructor instead of adding an iterator method, but I find the