W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2012

Re: [FileAPI] createObjectURL isReusable proposal

From: Charles Pritchard <chuck@jumis.com>
Date: Thu, 2 Feb 2012 13:48:59 -0800
Message-Id: <45359A4D-0E3B-4FEA-BA71-D3DE3ABEC5F0@jumis.com>
Cc: Arun Ranganathan <aranganathan@mozilla.com>, Darin Fisher <darin@chromium.org>, Glenn Maynard <glenn@zewt.org>, Adrian Bateman <adrianba@microsoft.com>, "Web Applications Working Group WG (public-webapps@w3.org)" <public-webapps@w3.org>, Feras Moussa <ferasm@microsoft.com>
To: Ian Hickson <ian@hixie.ch>




On Feb 2, 2012, at 1:40 PM, Ian Hickson <ian@hixie.ch> wrote:

> On Thu, 2 Feb 2012, Arun Ranganathan wrote:
>> 
>> 2. Could we modify things so that img.src = blob is a reality? Mainly, 
>> if we modify things for the *most common* use case, that could be useful 
>> in mitigating some of our fears. Hixie, is this possible?
> 
> Anything's possible, but I think the pain here would far outweigh the 
> benefits. There would be some really hard questions to answer, too (e.g. 
> what would innerHTML return? If you copied such an image from a 
> contentEditable section and pasted it lower down the same section, would 
> it still have the image?).

How about just a convenience method.

Blob.prototype.toString=function(){ return URL.createObjectURL(this);
};
Received on Thursday, 2 February 2012 21:49:28 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:50 GMT