From 0cf3fcfd33d842e0c986b4da56db25169f6040dc Mon Sep 17 00:00:00 2001 From: Emanuel Krivoy Date: Tue, 5 Apr 2022 19:17:59 +0200 Subject: [PATCH] Remove options parameter For more context see https://github.com/whatwg/fs/issues/19. --- index.bs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/index.bs b/index.bs index fc1cf25..e137910 100644 --- a/index.bs +++ b/index.bs @@ -451,18 +451,12 @@ dictionary FileSystemCreateWritableOptions { boolean keepExistingData = false; }; -enum AccessHandleMode { "in-place" }; - -dictionary FileSystemFileHandleCreateAccessHandleOptions { - required AccessHandleMode mode; -}; - [Exposed=(Window,Worker), SecureContext, Serializable] interface FileSystemFileHandle : FileSystemHandle { Promise getFile(); Promise createWritable(optional FileSystemCreateWritableOptions options = {}); [Exposed=DedicatedWorker] - Promise createSyncAccessHandle(FileSystemFileHandleCreateAccessHandleOptions options); + Promise createSyncAccessHandle(); }; @@ -565,7 +559,7 @@ The createWritable(|options|) method, ### The {{FileSystemFileHandle/createSyncAccessHandle()}} method ### {#api-filesystemfilehandle-createsyncaccesshandle}
- : |handle| = await |fileHandle| . {{FileSystemFileHandle/createSyncAccessHandle()|createSyncAccessHandle}}({ {{FileSystemFileHandleCreateAccessHandleOptions/mode}}: "in-place" }) + : |handle| = await |fileHandle| . {{FileSystemFileHandle/createSyncAccessHandle()|createSyncAccessHandle}}() :: Returns a {{FileSystemSyncAccessHandle}} that can be used to read/write from/to the file. Changes made through |handle| might be immediately reflected in the file represented by |fileHandle|. To ensure the changes are reflected in this file, the handle must be flushed or closed. @@ -580,14 +574,11 @@ The createWritable(|options|) method, contexts where asynchronous operations come with high overhead, i.e., WebAssembly. For the time being, this method will only succeed when the |fileHandle| belongs to the - [=origin private file system=]. Also temporarily, the {{FileSystemFileHandleCreateAccessHandleOptions/mode}} parameter - must be set to "in-place". This prevents us from setting a default behavior and allows us to bring access handles to - other filesytems in the future. - + [=origin private file system=].
-The createSyncAccessHandle(|options|) method, when invoked, must run these steps: +The createSyncAccessHandle() method, when invoked, must run these steps: 1. Let |result| be [=a new promise=]. 1. Run the following steps [=in parallel=]: