W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

Re: [FileAPI] createObjectURL isReusable proposal

From: Arun Ranganathan <aranganathan@mozilla.com>
Date: Fri, 16 Dec 2011 03:11:40 -0800 (PST)
To: Adrian Bateman <adrianba@microsoft.com>
Cc: Feras Moussa <ferasm@microsoft.com>, "Web Applications Working Group WG (public-webapps@w3.org)" <public-webapps@w3.org>
Message-ID: <1128783899.81281.1324033900011.JavaMail.root@zimbra1.shared.sjc1.mozilla.com>
Adrian,


----- Original Message -----
> At TPAC [1,2] I described our proposal for adding an isReusable flag
> to
> createObjectURL. A common pattern we have seen is the need for a blob
> URL
> for a single use (for example, loading into an <img> element) and then
> revoking the URL. This requires a fair amount of boilerplate code to
> handle the load/error events.

I think we should work with the assumption that revoke* won't be called often. Do you think lifetime conditions are insufficient here in cases where revoke* is not called?  

Is the additional boolean something that the developers you've polled say adds clarity over the lifetime conditions?

I agree that create* / revoke* is a fair amount of boilerplate for very simple uses. But I'm lukewarm about this proposal as it stands, since I'm not totally sure what it buys us really, since both models lend themselves to abuse of the default (not calling revoke* or relying on the default value of the new param).  If we go this route, I'm inclined to agree that we don't really want a boolean, but something like an options.

-- A*
Received on Friday, 16 December 2011 11:14:38 GMT

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