Skip to content

Commit f91d809

Browse files
committed
Change IDL source for File API and update to latest IDL
1 parent c6e1173 commit f91d809

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

baselines/dom.generated.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ interface BiquadFilterOptions extends AudioNodeOptions {
142142
}
143143

144144
interface BlobPropertyBag {
145+
endings?: EndingType;
145146
type?: string;
146147
}
147148

@@ -5013,7 +5014,7 @@ interface FileReader extends EventTarget {
50135014
readAsArrayBuffer(blob: Blob): void;
50145015
readAsBinaryString(blob: Blob): void;
50155016
readAsDataURL(blob: Blob): void;
5016-
readAsText(blob: Blob, label?: string): void;
5017+
readAsText(blob: Blob, encoding?: string): void;
50175018
readonly DONE: number;
50185019
readonly EMPTY: number;
50195020
readonly LOADING: number;
@@ -17653,6 +17654,7 @@ type DisplayCaptureSurfaceType = "monitor" | "window" | "application" | "browser
1765317654
type DistanceModelType = "linear" | "inverse" | "exponential";
1765417655
type DocumentReadyState = "loading" | "interactive" | "complete";
1765517656
type EndOfStreamError = "network" | "decode";
17657+
type EndingType = "transparent" | "native";
1765617658
type FillMode = "none" | "forwards" | "backwards" | "both" | "auto";
1765717659
type GamepadHand = "" | "left" | "right";
1765817660
type GamepadHapticActuatorType = "vibration";

baselines/webworker.generated.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ interface Algorithm {
3939
}
4040

4141
interface BlobPropertyBag {
42+
endings?: EndingType;
4243
type?: string;
4344
}
4445

@@ -1197,7 +1198,7 @@ interface FileReader extends EventTarget {
11971198
readAsArrayBuffer(blob: Blob): void;
11981199
readAsBinaryString(blob: Blob): void;
11991200
readAsDataURL(blob: Blob): void;
1200-
readAsText(blob: Blob, label?: string): void;
1201+
readAsText(blob: Blob, encoding?: string): void;
12011202
readonly DONE: number;
12021203
readonly EMPTY: number;
12031204
readonly LOADING: number;
@@ -1219,7 +1220,7 @@ interface FileReaderSync {
12191220
readAsArrayBuffer(blob: Blob): ArrayBuffer;
12201221
readAsBinaryString(blob: Blob): string;
12211222
readAsDataURL(blob: Blob): string;
1222-
readAsText(blob: Blob, label?: string): string;
1223+
readAsText(blob: Blob, encoding?: string): string;
12231224
}
12241225

12251226
declare var FileReaderSync: {
@@ -2967,6 +2968,7 @@ type IDBValidKey = number | string | Date | BufferSource | IDBArrayKey;
29672968
type Transferable = ArrayBuffer | MessagePort | ImageBitmap;
29682969
type BinaryType = "blob" | "arraybuffer";
29692970
type ClientTypes = "window" | "worker" | "sharedworker" | "all";
2971+
type EndingType = "transparent" | "native";
29702972
type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
29712973
type IDBRequestReadyState = "pending" | "done";
29722974
type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";

inputfiles/idl/File.widl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ interface Blob {
1212
optional DOMString contentType);
1313
};
1414

15+
enum EndingType { "transparent", "native" };
16+
1517
dictionary BlobPropertyBag {
1618
DOMString type = "";
19+
EndingType endings = "transparent";
1720
};
1821

1922
typedef (BufferSource or Blob or USVString) BlobPart;
@@ -43,7 +46,7 @@ interface FileReader: EventTarget {
4346
// async read methods
4447
void readAsArrayBuffer(Blob blob);
4548
void readAsBinaryString(Blob blob);
46-
void readAsText(Blob blob, optional DOMString label);
49+
void readAsText(Blob blob, optional DOMString encoding);
4750
void readAsDataURL(Blob blob);
4851

4952
void abort();
@@ -77,7 +80,7 @@ interface FileReaderSync {
7780

7881
ArrayBuffer readAsArrayBuffer(Blob blob);
7982
DOMString readAsBinaryString(Blob blob);
80-
DOMString readAsText(Blob blob, optional DOMString label);
83+
DOMString readAsText(Blob blob, optional DOMString encoding);
8184
DOMString readAsDataURL(Blob blob);
8285
};
8386

inputfiles/idlSources.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"title": "Encoding"
3030
},
3131
{
32-
"url": "https://www.w3.org/TR/FileAPI/",
32+
"url": "https://w3c.github.io/FileAPI/",
3333
"title": "File"
3434
},
3535
{

0 commit comments

Comments
 (0)