mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibWeb: Implement FileReaderSync
interface
This interface allows the user to read File or Blob objects synchronously from inside workers.
This commit is contained in:
parent
3f71907255
commit
bbcd8bd97c
Notes:
github-actions[bot]
2025-02-28 04:50:48 +00:00
Author: https://github.com/tcl3
Commit: bbcd8bd97c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3667
Reviewed-by: https://github.com/shannonbooth
6 changed files with 170 additions and 9 deletions
13
Libraries/LibWeb/FileAPI/FileReaderSync.idl
Normal file
13
Libraries/LibWeb/FileAPI/FileReaderSync.idl
Normal file
|
@ -0,0 +1,13 @@
|
|||
#import <FileAPI/Blob.idl>
|
||||
|
||||
// https://w3c.github.io/FileAPI/#FileReaderSync
|
||||
[Exposed=(DedicatedWorker,SharedWorker)]
|
||||
interface FileReaderSync {
|
||||
constructor();
|
||||
// Synchronously return strings
|
||||
|
||||
ArrayBuffer readAsArrayBuffer(Blob blob);
|
||||
DOMString readAsText(Blob blob, optional DOMString encoding);
|
||||
DOMString readAsBinaryString(Blob blob);
|
||||
DOMString readAsDataURL(Blob blob);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue