Skip to content

Commit

Permalink
Merge pull request #366 from WICG/options-parameter-IDL
Browse files Browse the repository at this point in the history
Mark options parameter as required
  • Loading branch information
fivedots authored Mar 29, 2022
2 parents 34b8ea1 + ff3e35b commit 27b0c28
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions AccessHandle.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ This proposal only currently considers additions to OPFS, but it would probably
be worthwhile to expand the new functionality to arbitrary file handles. While
the exact behavior of *AccessHandles* outside of OPFS would need to be defined
in detail, it's almost certain that the one described in this proposal should
not be the default. To avoid setting it as such, we propose adding an optional
not be the default. To avoid setting it as such, we propose adding a required
*mode* string parameter to *createAccessHandle()* and
*createSyncAccessHandle()*. Some possible values *mode* could take are:

Expand All @@ -206,7 +206,8 @@ not be the default. To avoid setting it as such, we propose adding an optional
It's possible that this mode would only be allowed in OPFS.

Both the naming and semantics of the *mode* parameter have to be more concretely
defined.
defined. When a default behavior is agreed upon, the parameter should be made
optional.

### Assurances on non-awaited consistency

Expand Down Expand Up @@ -243,13 +244,13 @@ interface FileSystemFileHandle : FileSystemHandle {
Promise<File> getFile();
Promise<FileSystemWritableFileStream> createWritable(optional FileSystemCreateWritableOptions options = {});
Promise<FileSystemAccessHandle> createAccessHandle(optional FileSystemFileHandleCreateAccessHandleOptions options = {});
Promise<FileSystemAccessHandle> createAccessHandle(FileSystemFileHandleCreateAccessHandleOptions options = {});
[Exposed=DedicatedWorker]
Promise<FileSystemSyncAccessHandle> createSyncAccessHandle(optional FileSystemFileHandleCreateAccessHandleOptions options = {});
Promise<FileSystemSyncAccessHandle> createSyncAccessHandle(FileSystemFileHandleCreateAccessHandleOptions options = {});
};
dictionary FileSystemFileHandleCreateAccessHandleOptions {
AccessHandleMode mode;
required AccessHandleMode mode;
};
// For more details and possible modes, see "Exposing AccessHandles on all
Expand Down

0 comments on commit 27b0c28

Please sign in to comment.