Re: ISSUE-75: Document pointer needs fixing [XHR]

On Fri, 26 Sep 2008 12:13:22 +0200, Web Applications Working Group Issue
Tracker <sysbot+tracker@w3.org> wrote:
> ISSUE-75: Document pointer needs fixing [XHR]
>
> http://www.w3.org/2008/webapps/track/issues/75
>
> Raised by: Anne van Kesteren
> On product: XHR
>
> In the following scenarios it's not clear what should happen to the  
> Document pointer:
>
> var randomObj = {};
> randomObj.XMLHttpRequest = someWindow.XMLHttpRequest;
> new randomObj.XMLHttpRequest();
>
> or
>
> window.foreignXHR = otherWindow.XMLHttpRequest
> new foreignXHR();
>
> Needs testing in Internet Explorer since we followed that for the  
> definition of Document pointer so far. (Thanks to Sam and Maciej.)

FWIW, I believe the solution here is that the XMLHttpRequest attribute on  
the global object becomes associated with a "script execution context"  
(HTML5). This also means that the base URL comes from that "script  
execution context" and is not located during construction of the  
XMLHttpRequest object. That should also remove Hallvord's concern.

I will update the draft once HTML5 is more stable (apparently that section  
will change significantly in the upcoming months).


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Wednesday, 7 January 2009 14:33:28 UTC