W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2013

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

From: David Bruant <bruant.d@gmail.com>
Date: Wed, 31 Jul 2013 21:44:43 +0200
Message-ID: <51F9692B.3090903@gmail.com>
To: Webapps WG <public-webapps@w3.org>

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.


[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/
[5] https://mega.co.nz/#blog_1
Received on Wednesday, 31 July 2013 19:45:14 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:57 UTC