Data uri origin inheritance

João Eiras <[email protected]>
Newsgroups gmane.comp.web.dom.general
Organization Opera Software ASA
Message-ID <op.w9qbq1jgm7930f@localhost>
Hi!

I'd like some clarification regarding origin inheritance of a Document  
generated with a data uri.

#origin

So lets consider I have a document A and a document B which is owned by A  
(iframe or pop-up).

 From what I understood, if I have some navigation action from A to B with  
a data uri, B will inherit the origin from A (all perfectly standard). But  
if that navigation action is triggered by a script, B will inherit the  
origin of the Window under which the script ran. Correct ?

If so, why does the spec do this special distinction ? Is there any  
situation where the script would be in a different origin from A ? The  
only thing I came up with was fiddling with document.domain: have A still,  
have a third C document in an iframe which runs in a sub-domain of A,  
assign document.domain and run a script in C which tells A to navigate to  
the data uri. I've made such testcase but fail to see any browser showing  
the behavior. It also seems quite convoluted what one need to do to view  
this behavior.

In what other ways is this possible to test ? What's the use case for this  
?

Thank you.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.