| // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| part of $LIBRARYNAME; |
| |
| $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| $if DART2JS |
| /** |
| * Gets an instance of the Indexed DB factory to being using Indexed DB. |
| * |
| * Use [IdbFactory.supported] to check if Indexed DB is supported on the |
| * current platform. |
| */ |
| @SupportedBrowser(SupportedBrowser.CHROME, '23.0') |
| @SupportedBrowser(SupportedBrowser.FIREFOX, '15.0') |
| @SupportedBrowser(SupportedBrowser.IE, '10.0') |
| @Experimental |
| IdbFactory get indexedDB => |
| JS('IdbFactory', |
| '#.indexedDB || #.webkitIndexedDB || #.mozIndexedDB', |
| this, this, this); |
| $endif |
| |
| /** |
| * Access a sandboxed file system of the specified `size`. If `persistent` is |
| * true, the application will request permission from the user to create |
| * lasting storage. This storage cannot be freed without the user's |
| * permission. Returns a [Future] whose value stores a reference to the |
| * sandboxed file system for use. Because the file system is sandboxed, |
| * applications cannot access file systems created in other web pages. |
| */ |
| @DomName('WorkerContext.webkitRequestFileSystem') |
| @DocsEditable |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @Experimental |
| Future<FileSystem> requestFileSystem(int size, {bool persistent: false}) { |
| return _requestFileSystem(persistent? 1 : 0, size); |
| } |
| |
| /** |
| * Access a sandboxed file system of the specified `size`. If `persistent` is |
| * true, the application will request permission from the user to create |
| * lasting storage. This storage cannot be freed without the user's |
| * permission. This call will block until a reference to the synchronous file |
| * system API has been obtained. Because the file system is sandboxed, |
| * applications cannot access file systems created in other web pages. |
| */ |
| @DomName('WorkerContext.webkitRequestFileSystemSync') |
| @DocsEditable |
| @SupportedBrowser(SupportedBrowser.CHROME) |
| @Experimental |
| FileSystemSync requestFileSystemSync(int size, {bool persistent: false}) { |
| return _requestFileSystemSync(persistent? 1 : 0, size); |
| } |
| $!MEMBERS |
| } |