Re: Blob URL Origin

On Mon, May 12, 2014 at 11:41 AM, Jonas Sicking <jonas@sicking.cc> wrote:
>
> I'd really rather we didn't make web pages parse these strings to get the
> origin.  A static method on Blob that takes a valid blob: URI and returns
> its origin seems like it should be pretty easy for UAs to implement, though.
>
> (new URL(url)).origin should work, no?
>
I don't think there have been any real differences to argue between the
"implicitly" or "explicitly" approaches, but this does argue for
"explicit".  Otherwise, new URL(blobURL) would have to synchronously read
the associated Blob's metadata (which might be on disk or in another
process), and the result of new URL() would change when a blob URL is
revoked.

-- 
Glenn Maynard

Received on Monday, 12 May 2014 20:12:01 UTC