which getElementByClass implementations are favored?

J

Jorge

What is the difference between static NodeList and live NodeList?

That having a live nodeList is like having a multithreaded JS engine
and that's error prone and can easily break even the most innocent-
looking code such as e.g. this one, because it might happen than
suddenly item[n] becomes !== item[n] due to side-effects :

n= liveNodeList.length;

while (n--) {
function1.call(liveNodeList[n]);
function1.call(liveNodeList[n]); //->liveNodeList[n] == null
}
 
J

Jorge

What is the difference between static NodeList and live NodeList?

That having a live nodeList is like having a multithreaded JS engine
and that's error prone and can easily break even the most innocent-
looking code such as e.g. this one, because it might happen than
suddenly item[n] becomes !== item[n] due to side-effects :

n= liveNodeList.length;

while (n--) {
function1.call(liveNodeList[n]);
function2.call(liveNodeList[n]); //->liveNodeList[n] == null
}
 
D

David Mark

David said:
[querySelectorAll]
IIRC, it's in IE8, upcoming Firefox 3.1 (3.5?), Safari 4 beta and in
Chrome 2.
And in Safari 3.1.
And in Opera 10 (currently alpha).
All good news (for those with a use for CSS selector queries.)  Won't
be doing that with scripts much longer.

What do you mean?

I mean that you won't need a script (e.g. jQuery) to query by CSS
selectors in a handful of modern browsers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,216
Latest member
topweb3twitterchannels

Latest Threads

Top