This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 14750 - Clarify what the origin of the new document is if the document is blown away (consider if the old document set document.domain)
Summary: Clarify what the origin of the new document is if the document is blown away ...
Status: RESOLVED WORKSFORME
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-10 08:23 UTC by contributor
Modified: 2012-07-18 18:49 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2011-11-10 08:23:17 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html
Multipage: http://www.whatwg.org/C#document.write()
Complete: http://www.whatwg.org/c#document.write()

Comment:
Clarify what the origin of the new document is if the document is blown away
(consider if the old document set document.domain)

Posted from: 85.227.157.105 by simonp@opera.com
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/535.8 (KHTML, like Gecko) Chrome/17.0.932.0 Safari/535.8
Comment 1 Ian 'Hixie' Hickson 2011-11-11 00:03:26 UTC
Can you elaborate? Do you have an example of what you have in mind?
Comment 2 Simon Pieters 2011-11-11 07:16:26 UTC
http://example.org

<iframe src=http://foo.example.org/></iframe>
<script>
document.domain = 'example.org';
onload = function(){
  window[0].document.write('foo');
}
</script>


http://foo.example.org

<script>
document.domain = 'example.org';
</script>
Comment 3 Ian 'Hixie' Hickson 2011-12-07 23:35:36 UTC
Isn't the document recycled in that case? Thus the origin doesn't change?
Comment 4 Simon Pieters 2011-12-08 09:27:57 UTC
"Unload the Document object, with the recycle parameter set to true."

So, yes. For some reason this wasn't clear to me when I filed the bug. It was clear when I read it now, so closing.