1/* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 3 * You can obtaone at http://mozilla.org/MPL/2.0/. */ 4 5dictionary IDBFileMetadataParameters 6{ 7 boolean size = true; 8 boolean lastModified = true; 9}; 10 11[Exposed=(Window,System)] 12interface IDBFileHandle : EventTarget 13{ 14 readonly attribute IDBMutableFile? mutableFile; 15 // this is deprecated due to renaming in the spec 16 readonly attribute IDBMutableFile? fileHandle; // now mutableFile 17 readonly attribute FileMode mode; 18 readonly attribute boolean active; 19 attribute unsigned long long? location; 20 21 [Throws] 22 IDBFileRequest? getMetadata(optional IDBFileMetadataParameters parameters); 23 [Throws] 24 IDBFileRequest? readAsArrayBuffer(unsigned long long size); 25 [Throws] 26 IDBFileRequest? readAsText(unsigned long long size, 27 optional DOMString? encoding = null); 28 29 [Throws] 30 IDBFileRequest? write((DOMString or ArrayBuffer or ArrayBufferView or Blob) value); 31 [Throws] 32 IDBFileRequest? append((DOMString or ArrayBuffer or ArrayBufferView or Blob) value); 33 [Throws] 34 IDBFileRequest? truncate(optional unsigned long long size); 35 [Throws] 36 IDBFileRequest? flush(); 37 [Throws] 38 undefined abort(); 39 40 attribute EventHandler oncomplete; 41 attribute EventHandler onabort; 42 attribute EventHandler onerror; 43}; 44