[whatwg] Origin of a data: URL for an img

Section 6.3 "Origin" of the HTML Living Standard has this text (excerpted):

> For images:
> If an image was generated from a data: URL found in another Document or in a script
> The origin is the origin of the Document or script that loaded that image.
> If an image was obtained in some other manner (e.g. a data: URL typed in by the user)
> The origin is a globally unique identifier assigned when the image is created.

I'm going to refer to the first case above as the "found specs" and the second case as the "other specs". (Aside: it would be convenient for discussion if items in this section would have unique identifying numbers.)

What does "found" mean?
What is the difference between these two cases?
When do we switch from one case to the other?

Here are some of my guesses:

    var img = new Image;
    var iframe = document.querySelector('iframe#samedomain').contentWindow;
    img.src = iframe.globalStringWithDataURI; // "other specs"?
    img.src = iframe.document.querySelector('img#hasdatauri'); // "found specs"?
    img.src = img.src.replace( '0', '1' ); // "other specs"?

Does a JavaScript String object carry an origin along with it, but any mutation (and all new strings) switch to "other specs"?

This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

Received on Wednesday, 16 November 2011 14:25:48 UTC