W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2012

Re: Re: [XHR] Associating XHR instances with documents - clarify spec statement in 4.6.1

From: Hallvord Reiar Michaelsen Steen <hallvord@opera.com>
Date: Thu, 22 Nov 2012 14:14:55 +0100
To: "Anne van Kesteren" <annevk@annevk.nl>
Cc: "Jungkee Song" <jungkee.song@samsung.com>, "Julian Aubourg" <j@ubourg.net>, public-webapps@w3.org
Message-ID: <6eaedb8ef323af9c790ba608863163da@opera.com>

> > "Let document be the document associated with the global object of the XMLHttpRequest interface object."
> 
> You'd also need to check the JavaScript global environment.



Thanks for responding. How?
 
> What I mean is that <var>-variables are scoped to the algorithm they
> are used in. So you need to re-introduce <dfn
> title=concept-XMLHttpRequest-document>document</dfn> or some such.



Ah, OK. We already have an instance property named "referrer source", which is a somewhat obscure name but does reference the document. Can we just re-name "referrer source" => "associated document" or something, and set it in constructor, then use it for the "not fully active" check etc in open() ?


(Naming it "referrer source" re-uses terminology from CORS or Workers? I believe it will always refer to a document - in "web worker mode" the document associated with the script - and we can say "use associated document as *override referrer source* when referencing CORS algorithm. IMO this is easier to understand in the context of this spec.)


> > (Just for the record, the corner cases we need to consider here include stuff like
> > var xhr=new iframe.contentWindow.XMLHttpRequest()
> 
> This is not a corner case in actual content. If it was we would made
> it work the same way it does in Workers.



The precise definition of "corner case" is a hair I have no intention of helping you split :-)


-- 
Hallvord R. M. Steen
Core tester, Opera Software
Received on Thursday, 22 November 2012 13:16:19 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:56 GMT