- From: Ian Hickson <ian@hixie.ch>
- Date: Tue, 23 Oct 2012 04:36:31 +0000 (UTC)
- To: Boris Zbarsky <bzbarsky@MIT.EDU>
- cc: Bobby Holley <bobbyholley@gmail.com>, Adam Barth <w3c@adambarth.com>, public-script-coord@w3.org
On Mon, 22 Oct 2012, Boris Zbarsky wrote:
>
> It's about both, since they're identical, as far as I can tell. The
> text at
> http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-document-referrer
> and at
> http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#fetch
> step 2 "navigating" case are basically the same, and there's a Note at
> the former that says so.
Fair enough. (I should probably change document.referrer to be defined in
terms of the value computed in the 'fetch' algorithm, so that I only
have to fix it in one place if it's wrong.)
Anyway.
The question is what should the Referer header be for C in this case?:
<!DOCTYPE HTML> <!-- A -->
<iframe src=B></iframe>
<script>
onload = function () {
document.getElementsByTagName('iframe')[0].contentWindow.test();
};
</script>
<!DOCTYPE HTML> <!-- B -->
<iframe></iframe>
<script>
function test() {
document.getElementsByTagName('iframe')[0].contentWindow.location = 'C';
};
</script>
In that case, the answer is B, because "the browsing context of the script
that invoked the method" is B's, so that's the source browsing context, so
in the fetch algorithm /document/ is B, and so we use its address.
Which is what Bobby said. :-)
Sorry for being slow on this thing. I'm fine with changing it.
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 23 October 2012 04:36:54 UTC