11cb0ef41Sopenharmony_ci// GENERATED CONTENT - DO NOT EDIT 21cb0ef41Sopenharmony_ci// Content was automatically extracted by Reffy into webref 31cb0ef41Sopenharmony_ci// (https://github.com/w3c/webref) 41cb0ef41Sopenharmony_ci// Source: File API (https://w3c.github.io/FileAPI/) 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_ci[Exposed=(Window,Worker), Serializable] 71cb0ef41Sopenharmony_ciinterface Blob { 81cb0ef41Sopenharmony_ci constructor(optional sequence<BlobPart> blobParts, 91cb0ef41Sopenharmony_ci optional BlobPropertyBag options = {}); 101cb0ef41Sopenharmony_ci 111cb0ef41Sopenharmony_ci readonly attribute unsigned long long size; 121cb0ef41Sopenharmony_ci readonly attribute DOMString type; 131cb0ef41Sopenharmony_ci 141cb0ef41Sopenharmony_ci // slice Blob into byte-ranged chunks 151cb0ef41Sopenharmony_ci Blob slice(optional [Clamp] long long start, 161cb0ef41Sopenharmony_ci optional [Clamp] long long end, 171cb0ef41Sopenharmony_ci optional DOMString contentType); 181cb0ef41Sopenharmony_ci 191cb0ef41Sopenharmony_ci // read from the Blob. 201cb0ef41Sopenharmony_ci [NewObject] ReadableStream stream(); 211cb0ef41Sopenharmony_ci [NewObject] Promise<USVString> text(); 221cb0ef41Sopenharmony_ci [NewObject] Promise<ArrayBuffer> arrayBuffer(); 231cb0ef41Sopenharmony_ci}; 241cb0ef41Sopenharmony_ci 251cb0ef41Sopenharmony_cienum EndingType { "transparent", "native" }; 261cb0ef41Sopenharmony_ci 271cb0ef41Sopenharmony_cidictionary BlobPropertyBag { 281cb0ef41Sopenharmony_ci DOMString type = ""; 291cb0ef41Sopenharmony_ci EndingType endings = "transparent"; 301cb0ef41Sopenharmony_ci}; 311cb0ef41Sopenharmony_ci 321cb0ef41Sopenharmony_citypedef (BufferSource or Blob or USVString) BlobPart; 331cb0ef41Sopenharmony_ci 341cb0ef41Sopenharmony_ci[Exposed=(Window,Worker), Serializable] 351cb0ef41Sopenharmony_ciinterface File : Blob { 361cb0ef41Sopenharmony_ci constructor(sequence<BlobPart> fileBits, 371cb0ef41Sopenharmony_ci USVString fileName, 381cb0ef41Sopenharmony_ci optional FilePropertyBag options = {}); 391cb0ef41Sopenharmony_ci readonly attribute DOMString name; 401cb0ef41Sopenharmony_ci readonly attribute long long lastModified; 411cb0ef41Sopenharmony_ci}; 421cb0ef41Sopenharmony_ci 431cb0ef41Sopenharmony_cidictionary FilePropertyBag : BlobPropertyBag { 441cb0ef41Sopenharmony_ci long long lastModified; 451cb0ef41Sopenharmony_ci}; 461cb0ef41Sopenharmony_ci 471cb0ef41Sopenharmony_ci[Exposed=(Window,Worker), Serializable] 481cb0ef41Sopenharmony_ciinterface FileList { 491cb0ef41Sopenharmony_ci getter File? item(unsigned long index); 501cb0ef41Sopenharmony_ci readonly attribute unsigned long length; 511cb0ef41Sopenharmony_ci}; 521cb0ef41Sopenharmony_ci 531cb0ef41Sopenharmony_ci[Exposed=(Window,Worker)] 541cb0ef41Sopenharmony_ciinterface FileReader: EventTarget { 551cb0ef41Sopenharmony_ci constructor(); 561cb0ef41Sopenharmony_ci // async read methods 571cb0ef41Sopenharmony_ci undefined readAsArrayBuffer(Blob blob); 581cb0ef41Sopenharmony_ci undefined readAsBinaryString(Blob blob); 591cb0ef41Sopenharmony_ci undefined readAsText(Blob blob, optional DOMString encoding); 601cb0ef41Sopenharmony_ci undefined readAsDataURL(Blob blob); 611cb0ef41Sopenharmony_ci 621cb0ef41Sopenharmony_ci undefined abort(); 631cb0ef41Sopenharmony_ci 641cb0ef41Sopenharmony_ci // states 651cb0ef41Sopenharmony_ci const unsigned short EMPTY = 0; 661cb0ef41Sopenharmony_ci const unsigned short LOADING = 1; 671cb0ef41Sopenharmony_ci const unsigned short DONE = 2; 681cb0ef41Sopenharmony_ci 691cb0ef41Sopenharmony_ci readonly attribute unsigned short readyState; 701cb0ef41Sopenharmony_ci 711cb0ef41Sopenharmony_ci // File or Blob data 721cb0ef41Sopenharmony_ci readonly attribute (DOMString or ArrayBuffer)? result; 731cb0ef41Sopenharmony_ci 741cb0ef41Sopenharmony_ci readonly attribute DOMException? error; 751cb0ef41Sopenharmony_ci 761cb0ef41Sopenharmony_ci // event handler content attributes 771cb0ef41Sopenharmony_ci attribute EventHandler onloadstart; 781cb0ef41Sopenharmony_ci attribute EventHandler onprogress; 791cb0ef41Sopenharmony_ci attribute EventHandler onload; 801cb0ef41Sopenharmony_ci attribute EventHandler onabort; 811cb0ef41Sopenharmony_ci attribute EventHandler onerror; 821cb0ef41Sopenharmony_ci attribute EventHandler onloadend; 831cb0ef41Sopenharmony_ci}; 841cb0ef41Sopenharmony_ci 851cb0ef41Sopenharmony_ci[Exposed=(DedicatedWorker,SharedWorker)] 861cb0ef41Sopenharmony_ciinterface FileReaderSync { 871cb0ef41Sopenharmony_ci constructor(); 881cb0ef41Sopenharmony_ci // Synchronously return strings 891cb0ef41Sopenharmony_ci 901cb0ef41Sopenharmony_ci ArrayBuffer readAsArrayBuffer(Blob blob); 911cb0ef41Sopenharmony_ci DOMString readAsBinaryString(Blob blob); 921cb0ef41Sopenharmony_ci DOMString readAsText(Blob blob, optional DOMString encoding); 931cb0ef41Sopenharmony_ci DOMString readAsDataURL(Blob blob); 941cb0ef41Sopenharmony_ci}; 951cb0ef41Sopenharmony_ci 961cb0ef41Sopenharmony_ci[Exposed=(Window,DedicatedWorker,SharedWorker)] 971cb0ef41Sopenharmony_cipartial interface URL { 981cb0ef41Sopenharmony_ci static DOMString createObjectURL((Blob or MediaSource) obj); 991cb0ef41Sopenharmony_ci static undefined revokeObjectURL(DOMString url); 1001cb0ef41Sopenharmony_ci}; 101