Bug 1885602 - Part 5: Implement navigating to the SUMO help topic from the menu heade...
[gecko.git] / dom / webidl / FileSystemWritableFileStream.webidl
bloba6c2552cb6fc57c1fe17b053aeb53149699b853a
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this
4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 enum WriteCommandType {
7   "write",
8   "seek",
9   "truncate"
12 [GenerateConversionToJS]
13 dictionary WriteParams {
14   required WriteCommandType type;
15   unsigned long long? size;
16   unsigned long long? position;
17   (BufferSource or Blob or UTF8String)? data;
20 typedef (BufferSource or Blob or UTF8String or WriteParams) FileSystemWriteChunkType;
22 [Exposed=(Window,Worker), SecureContext, Pref="dom.fs.enabled"]
23 interface FileSystemWritableFileStream : WritableStream {
24   [NewObject, Throws]
25   Promise<undefined> write(FileSystemWriteChunkType data);
26   [NewObject]
27   Promise<undefined> seek(unsigned long long position);
28   [NewObject]
29   Promise<undefined> truncate(unsigned long long size);