Skip to content

Commit

Permalink
Mark all interfaces as [SecureContext]. (#59)
Browse files Browse the repository at this point in the history
Also add [Exposed=] attributes to all interfaces, as required by WebIDL.

Fixes #58
  • Loading branch information
mkruisselbrink authored Jun 7, 2019
1 parent fac3228 commit 7e87990
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ dictionary FileSystemHandlePermissionDescriptor {
boolean writable = false;
};

[Exposed=(Window,Worker), SecureContext]
interface FileSystemHandle {
readonly attribute boolean isFile;
readonly attribute boolean isDirectory;
Expand Down Expand Up @@ -173,6 +174,7 @@ The <dfn method for=FileSystemHandle>requestPermission(|descriptor|)</dfn> metho
## The {{FileSystemFileHandle}} interface ## {#api-filesystemfilehandle}

<xmp class=idl>
[Exposed=(Window,Worker), SecureContext]
interface FileSystemFileHandle : FileSystemHandle {
Promise<File> getFile();
Promise<FileSystemWriter> createWriter();
Expand Down Expand Up @@ -223,6 +225,7 @@ dictionary FileSystemRemoveOptions {
boolean recursive = false;
};

[Exposed=(Window,Worker), SecureContext]
interface FileSystemDirectoryHandle : FileSystemHandle {
Promise<FileSystemFileHandle> getFile(USVString name, optional FileSystemGetFileOptions options);
Promise<FileSystemDirectoryHandle> getDirectory(USVString name, optional FileSystemGetDirectoryOptions options);
Expand Down Expand Up @@ -375,6 +378,7 @@ these steps:
## The {{FileSystemWriter}} interface ## {#api-filesystemwriter}

<xmp class=idl>
[Exposed=(Window,Worker), SecureContext]
interface FileSystemWriter {
Promise<void> write(unsigned long long position, (BufferSource or Blob or USVString) data);
WritableStream asWritableStream();
Expand Down Expand Up @@ -451,8 +455,8 @@ dictionary ChooseFileSystemEntriesOptions {
boolean excludeAcceptAllOption = false;
};

[SecureContext]
partial interface Window {
[SecureContext]
Promise<(FileSystemHandle or sequence<FileSystemHandle>)>
chooseFileSystemEntries(optional ChooseFileSystemEntriesOptions options);
};
Expand Down Expand Up @@ -517,6 +521,7 @@ dictionary GetSystemDirectoryOptions {
required SystemDirectoryType type;
};

[SecureContext]
partial interface FileSystemDirectoryHandle {
static Promise<FileSystemDirectoryHandle> getSystemDirectory(GetSystemDirectoryOptions options);
};
Expand Down

0 comments on commit 7e87990

Please sign in to comment.