[FILE-SYSTEM] Hoping the globals of the FileSystem spec are TEMPORARY and not PERSISTENT

Hi,

The LocalFileSystem interface [1] defines the TEMPORARY and PERSISTENT 
constants and has the [NoInterfaceObject] extended attribute. It seems 
that the intention behind that choice was to expose these constants on 
the global object (see code snippets of [3] and the fact that these are 
indeed exposed as global properties in the console of a recent Chrome) [2].

This is a bad idea: imagine all specs start defining constants on the 
global object! This is an unhealthy practice that endangers the 
scalability of the web platforms when it comes to exposing APIs.

For that reason, I would like to ask here for the removal of these 
constants properties from the global. This leads to 2 concerns:
1) is this change web compatible?
Google has been promoting this API and the use of these globals through 
code snippets (including [3]) pretty heavily. Among others Mega made 
pretty clear that they were using the API [5].

2) Assuming the answer to 1) is "yes", how and what's the replacement?
One idea is to use strings:
     window.requestFileSystem("temporary", size, onInitFs, errorHandler);
That could work fine.

David

[1] 
http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#using-localfilesystem
[2] This appears to be a misinterpretation of the WebIDL spec [4], but 
that's not what brings me here, let's solve this issue separately.
[3] http://www.html5rocks.com/en/tutorials/file/filesystem/
[4] 
http://lists.w3.org/Archives/Public/public-script-coord/2013JulSep/0203.html
[5] https://mega.co.nz/#blog_1

Received on Wednesday, 31 July 2013 19:45:14 UTC