Re: [FileAPI] createObjectURL isReusable proposal

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 UTC