Re: [XHR] Need to define the behavior when the Window the XHR is created from does not have an associated document

2012-12-14 Thread Anne van Kesteren
On Fri, Dec 14, 2012 at 9:38 PM, Ian Hickson wrote: > Windows themselves don't "point" anywhere. There's a variety of > relationships from Window objects to Document objects (and vice versa). > What's the precise text or script you're asking about? http://xhr.spec.whatwg.org/#dom-xmlhttprequest i

Re: [XHR] Need to define the behavior when the Window the XHR is created from does not have an associated document

2012-12-14 Thread Olli Pettay
On 12/14/2012 09:46 PM, Boris Zbarsky wrote: On 12/14/12 2:29 PM, Anne van Kesteren wrote: Per Hixie the Document is associated with both the old and the new Window. Meaning that XMLHttpRequest will function normally even though XMLHttpRequest != window.XMLHttpRequest. I'm not sure it actually

Re: [XHR] Need to define the behavior when the Window the XHR is created from does not have an associated document

2012-12-14 Thread Boris Zbarsky
On 12/14/12 2:29 PM, Anne van Kesteren wrote: Per Hixie the Document is associated with both the old and the new Window. Meaning that XMLHttpRequest will function normally even though XMLHttpRequest != window.XMLHttpRequest. I'm not sure it actually will; Olli had some concerns about event dis

Re: [XHR] Need to define the behavior when the Window the XHR is created from does not have an associated document

2012-12-14 Thread Boris Zbarsky
On 12/14/12 1:55 PM, Anne van Kesteren wrote: It seems to depend on whether or not the old Window object still has an associated document. If it still points to the active document the above "would work". If it points nowhere the above cannot work Well. It depends on whether we want to use the

Re: [XHR] Need to define the behavior when the Window the XHR is created from does not have an associated document

2012-12-14 Thread Boris Zbarsky
On 12/14/12 12:54 PM, Anne van Kesteren wrote: On Fri, Dec 14, 2012 at 6:40 PM, Boris Zbarsky wrote: Which other case? The document.open() one? In that case, there is no problem with the document per se; the only question is whether the XHR has an associated document object at all in that cas

Re: [XHR] Need to define the behavior when the Window the XHR is created from does not have an associated document

2012-12-14 Thread Anne van Kesteren
On Fri, Dec 14, 2012 at 6:40 PM, Boris Zbarsky wrote: > Which other case? The document.open() one? In that case, there is no > problem with the document per se; the only question is whether the XHR has > an associated document object at all in that case... and per spec not > having one does NOT

Re: [XHR] Need to define the behavior when the Window the XHR is created from does not have an associated document

2012-12-14 Thread Boris Zbarsky
On 12/14/12 11:54 AM, Anne van Kesteren wrote: On Fri, Dec 14, 2012 at 5:30 PM, Boris Zbarsky wrote: But note that you can get the same effect by just navigating the a browsing context, then calling a function that was defined in the no-longer-active document, without worrying about browsers th

Re: [XHR] Need to define the behavior when the Window the XHR is created from does not have an associated document

2012-12-14 Thread Anne van Kesteren
On Fri, Dec 14, 2012 at 5:30 PM, Boris Zbarsky wrote: > But note that you can get the same effect by just navigating the a browsing > context, then calling a function that was defined in the no-longer-active > document, without worrying about browsers that have buggy open() > implementations. The

Re: [XHR] Need to define the behavior when the Window the XHR is created from does not have an associated document

2012-12-14 Thread Boris Zbarsky
On 12/14/12 6:49 AM, Jungkee Song wrote: FWIW, document.open() does not create a new Window object Yes, it does. See http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#dom-document-open processing steps step 14. WebKit gets this wrong, but other UAs do it right.