Re: [whatwg] Intergrating the DOM and JavaScript (JSDOM)

2006-05-12 Thread Dean Edwards
On 12/05/06, Andrew Fedoniouk [EMAIL PROTECTED] wrote: This is in fact just one line: var checked = root.select(input[type=checkbox]:checked); You appear to be using a different DOM to everyone else. -dean

Re: [whatwg] Intergrating the DOM and JavaScript (JSDOM)

2006-05-12 Thread Lachlan Hunt
Dean Edwards wrote: On 12/05/06, Andrew Fedoniouk [EMAIL PROTECTED] wrote: var checked = root.select(input[type=checkbox]:checked); You appear to be using a different DOM to everyone else. He's using his proprietary DOM extensions [1] found in his own browser. Though from what I gather

Re: [whatwg] Intergrating the DOM and JavaScript (JSDOM)

2006-05-12 Thread Andrew Fedoniouk
- Original Message - From: Lachlan Hunt [EMAIL PROTECTED] To: Dean Edwards [EMAIL PROTECTED] Cc: Andrew Fedoniouk [EMAIL PROTECTED]; whatwg [EMAIL PROTECTED] Sent: Friday, May 12, 2006 4:06 AM Subject: Re: [whatwg] Intergrating the DOM and JavaScript (JSDOM) Dean Edwards wrote: On 12

Re: [whatwg] Intergrating the DOM and JavaScript (JSDOM)

2006-05-11 Thread Lachlan Hunt
Dean Edwards wrote: It would be great if NodeLists were subclasses of JavaScript Array objects (especially with the introduction of Mozilla's Array Extras [1]). This makes iteration over DOM queries more flexible. It sounds like a nice idea, but there are some problems with it that I can

Re: [whatwg] Intergrating the DOM and JavaScript (JSDOM)

2006-05-11 Thread Dean Edwards
On 11/05/06, Lachlan Hunt [EMAIL PROTECTED] wrote: Dean Edwards wrote: It would be great if NodeLists were subclasses of JavaScript Array objects (especially with the introduction of Mozilla's Array Extras [1]). This makes iteration over DOM queries more flexible. It sounds like a nice idea,

Re: [whatwg] Intergrating the DOM and JavaScript (JSDOM)

2006-05-11 Thread Dean Edwards
Some code to illustrate: // old way var isChecked = false; var inputs = document.getElementsByTagName(input); for (var i = 0; i inputs.length; i++) { if (inputs[i].type == checkbox inputs[i].checked) { isChecked = true; break; } } // better (using iterators on NodeList) var isChecked =

Re: [whatwg] Intergrating the DOM and JavaScript (JSDOM)

2006-05-11 Thread Andrew Fedoniouk
- Original Message - From: Dean Edwards [EMAIL PROTECTED] To: whatwg [EMAIL PROTECTED] Some code to illustrate: // old way var isChecked = false; var inputs = document.getElementsByTagName(input); for (var i = 0; i inputs.length; i++) { if (inputs[i].type == checkbox