Skip to content

Commit f538da5

Browse files
authored
Merge pull request #536 from blixt/master
Change FileReader.readAsText‘s 2nd argument name
2 parents fb643a6 + f91d809 commit f538da5

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

@@ -5016,7 +5017,7 @@ interface FileReader extends EventTarget {
50165017
readAsArrayBuffer(blob: Blob): void;
50175018
readAsBinaryString(blob: Blob): void;
50185019
readAsDataURL(blob: Blob): void;
5019-
readAsText(blob: Blob, label?: string): void;
5020+
readAsText(blob: Blob, encoding?: string): void;
50205021
readonly DONE: number;
50215022
readonly EMPTY: number;
50225023
readonly LOADING: number;
@@ -17657,6 +17658,7 @@ type DisplayCaptureSurfaceType = "monitor" | "window" | "application" | "browser
1765717658
type DistanceModelType = "linear" | "inverse" | "exponential";
1765817659
type DocumentReadyState = "loading" | "interactive" | "complete";
1765917660
type EndOfStreamError = "network" | "decode";
17661+
type EndingType = "transparent" | "native";
1766017662
type FillMode = "none" | "forwards" | "backwards" | "both" | "auto";
1766117663
type GamepadHand = "" | "left" | "right";
1766217664
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: {
@@ -2990,6 +2991,7 @@ type IDBValidKey = number | string | Date | BufferSource | IDBArrayKey;
29902991
type Transferable = ArrayBuffer | MessagePort | ImageBitmap;
29912992
type BinaryType = "blob" | "arraybuffer";
29922993
type ClientTypes = "window" | "worker" | "sharedworker" | "all";
2994+
type EndingType = "transparent" | "native";
29932995
type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
29942996
type IDBRequestReadyState = "pending" | "done";
29952997
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)