Re: [selectors-api] Liveness versus NodeList

2008-11-21 Thread Lachlan Hunt
Gavin Kistner wrote: DOM Level 2 Core and DOM Level 3 Core both say: The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live. [1] [2] NodeList and

Re: [selectors-api] Typo in Example

2008-11-21 Thread Lachlan Hunt
Gavin Kistner wrote: The Selectors API document, section 8, has this example code: var div = document.getElementById(bar); var p = bar.querySelector(body p); I assume that is supposed to be either... var div = document.getElementById(bar); var p = div.querySelector(body p); ...or...

Re: [selectors-api] First element example

2008-11-21 Thread Lachlan Hunt
Gavin Kistner wrote: The second example in section 8 uses the following code: var x = document.querySelector(#foo, #bar); It goes on to rather explicitly state, In the sample document above, it would select the div element with the ID of foo because it is first ***in document order*** (my

Re: [selectors-api] Liveness versus NodeList

2008-11-21 Thread Stewart Brodie
Lachlan Hunt [EMAIL PROTECTED] wrote: Gavin Kistner wrote: DOM Level 2 Core and DOM Level 3 Core both say: The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the

Re: [selectors-api] Names of querySelector() and querySelectorAll() methods

2008-11-21 Thread Lachlan Hunt
Gavin Kistner wrote: I find these names rather cumbersome and not very self-explanatory. I agree. Though it may be far too late for this suggestion, I would suggest that they should be something such as: findNode()/findNodes() or findNode()/findAllNodes() selectNode()/selectNodes() or

Re: [selectors-api] Liveness versus NodeList

2008-11-21 Thread Lachlan Hunt
Stewart Brodie wrote: You will still need a new type, as I don't see how you can possibly change the existing behaviour so dramatically under the feet of existing content. I would not like to lose the liveness property of node lists, as it would make NodeList objects incredibly memory

Re: [selectors-api] Liveness versus NodeList

2008-11-21 Thread Boris Zbarsky
Stewart Brodie wrote: This is considered to be a bug in the DOM Core specs, which will hopefully be fixed by Web DOM Core, which is a proposal Simon Pieters is working on. You will still need a new type, as I don't see how you can possibly change the existing behaviour so dramatically under

[XHR] security issue with spec's same-origin and the Document pointer

2008-11-21 Thread Hallvord R. M. Steen
http://www.w3.org/TR/XMLHttpRequest/#document-pointer says When the XMLHttpRequest() constructor is invoked a persistent pointer to the associated Document object is stored on the newly created object. This is the Document pointer. The associated Document object is the one returned by the

Re: [XHR] security issue with spec's same-origin and the Document pointer

2008-11-21 Thread Anne van Kesteren
On Fri, 21 Nov 2008 17:28:34 +0100, Hallvord R. M. Steen [EMAIL PROTECTED] wrote: var xhrConstructor = iframe.contentWindow.XMLHttpRequest; iframe.src='http://attackee.example.com/'; . . var xhr = new xhrConstructor(); When the constructor is invoked here, the associated document of its