From e277a0ef32102e86c125798cc62a67820efcb9a3 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sun, 25 Oct 2020 03:59:21 +0100 Subject: [PATCH 01/18] Remove unimplemented WindowClient#ancestorOrigins --- baselines/webworker.generated.d.ts | 1 - inputfiles/removedTypes.json | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index f24219da5..5d7d0b3d9 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -5394,7 +5394,6 @@ declare var WebSocket: { /** This ServiceWorker API interface represents the scope of a service worker client that is a document in a browser context, controlled by an active worker. The service worker client independently selects and uses a service worker for its own loading and sub-resources. */ interface WindowClient extends Client { - readonly ancestorOrigins: ReadonlyArray; readonly focused: boolean; readonly visibilityState: VisibilityState; focus(): Promise; diff --git a/inputfiles/removedTypes.json b/inputfiles/removedTypes.json index 021272ef0..547c77067 100644 --- a/inputfiles/removedTypes.json +++ b/inputfiles/removedTypes.json @@ -380,6 +380,13 @@ "WindowConsole" ] }, + "WindowClient": { + "properties": { + "property": { + "ancestorOrigins": null + } + } + }, "XPathNSResolver": null } }, From 8bd205d137f270d8d64ef928e834423370cc55bb Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sun, 25 Oct 2020 03:53:54 +0100 Subject: [PATCH 02/18] Remove unimplemented WorkerNavigator#serviceWorker --- baselines/webworker.generated.d.ts | 1 - inputfiles/removedTypes.json | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index 5d7d0b3d9..265a81e84 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -5516,7 +5516,6 @@ declare var WorkerLocation: { /** A subset of the Navigator interface allowed to be accessed from a Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.navigator property obtained by calling window.self.navigator. */ interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorStorage { readonly permissions: Permissions; - readonly serviceWorker: ServiceWorkerContainer; } declare var WorkerNavigator: { diff --git a/inputfiles/removedTypes.json b/inputfiles/removedTypes.json index 547c77067..24a8e3937 100644 --- a/inputfiles/removedTypes.json +++ b/inputfiles/removedTypes.json @@ -387,6 +387,13 @@ } } }, + "WorkerNavigator": { + "properties": { + "property": { + "serviceWorker": null + } + } + }, "XPathNSResolver": null } }, From 21278cb248b38cea563f673822af5961d3d2c32d Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sun, 25 Oct 2020 03:44:20 +0100 Subject: [PATCH 03/18] Remove unimplemented PushSubscriptionChangeEvent --- baselines/webworker.generated.d.ts | 17 ----------------- inputfiles/removedTypes.json | 8 ++++++++ 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index 265a81e84..934c5cea4 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -365,11 +365,6 @@ interface PushPermissionDescriptor extends PermissionDescriptor { userVisibleOnly?: boolean; } -interface PushSubscriptionChangeEventInit extends ExtendableEventInit { - newSubscription?: PushSubscription; - oldSubscription?: PushSubscription; -} - interface PushSubscriptionJSON { endpoint?: string; expirationTime?: number | null; @@ -2687,16 +2682,6 @@ declare var PushSubscription: { new(): PushSubscription; }; -interface PushSubscriptionChangeEvent extends ExtendableEvent { - readonly newSubscription: PushSubscription | null; - readonly oldSubscription: PushSubscription | null; -} - -declare var PushSubscriptionChangeEvent: { - prototype: PushSubscriptionChangeEvent; - new(type: string, eventInitDict?: PushSubscriptionChangeEventInit): PushSubscriptionChangeEvent; -}; - interface PushSubscriptionOptions { readonly applicationServerKey: ArrayBuffer | null; readonly userVisibleOnly: boolean; @@ -2944,7 +2929,6 @@ interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap { "notificationclick": NotificationEvent; "notificationclose": NotificationEvent; "push": PushEvent; - "pushsubscriptionchange": PushSubscriptionChangeEvent; "sync": SyncEvent; } @@ -2959,7 +2943,6 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope { onnotificationclick: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null; onnotificationclose: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null; onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null; - onpushsubscriptionchange: ((this: ServiceWorkerGlobalScope, ev: PushSubscriptionChangeEvent) => any) | null; onsync: ((this: ServiceWorkerGlobalScope, ev: SyncEvent) => any) | null; readonly registration: ServiceWorkerRegistration; readonly serviceWorker: ServiceWorker; diff --git a/inputfiles/removedTypes.json b/inputfiles/removedTypes.json index 24a8e3937..c3728d711 100644 --- a/inputfiles/removedTypes.json +++ b/inputfiles/removedTypes.json @@ -246,6 +246,7 @@ "PasswordCredential": null, "Position": null, "PositionError": null, + "PushSubscriptionChangeEvent": null, "RTCDataChannel": { "properties": { "property": { @@ -267,6 +268,13 @@ } } }, + "ServiceWorkerGlobalScope": { + "properties": { + "property": { + "onpushsubscriptionchange": null + } + } + }, "ShadowRoot": { "properties": { "property": { From 07010374ec555fe044d3b5ff7fafb02b8f6e0e44 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sun, 25 Oct 2020 03:34:26 +0100 Subject: [PATCH 04/18] Remove unimplemented WebGLObject --- baselines/dom.generated.d.ts | 32 ++++++++++---------------- baselines/webworker.generated.d.ts | 32 ++++++++++---------------- inputfiles/removedTypes.json | 37 ++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 40 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 07b47aaac..df0da2145 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -17364,7 +17364,7 @@ declare var WebGLActiveInfo: { }; /** Part of the WebGL API and represents an opaque buffer object storing data such as vertices or colors. */ -interface WebGLBuffer extends WebGLObject { +interface WebGLBuffer { } declare var WebGLBuffer: { @@ -17383,7 +17383,7 @@ declare var WebGLContextEvent: { }; /** Part of the WebGL API and represents a collection of buffers that serve as a rendering destination. */ -interface WebGLFramebuffer extends WebGLObject { +interface WebGLFramebuffer { } declare var WebGLFramebuffer: { @@ -17391,16 +17391,8 @@ declare var WebGLFramebuffer: { new(): WebGLFramebuffer; }; -interface WebGLObject { -} - -declare var WebGLObject: { - prototype: WebGLObject; - new(): WebGLObject; -}; - /** The WebGLProgram is part of the WebGL API and is a combination of two compiled WebGLShaders consisting of a vertex shader and a fragment shader (both written in GLSL). */ -interface WebGLProgram extends WebGLObject { +interface WebGLProgram { } declare var WebGLProgram: { @@ -17408,7 +17400,7 @@ declare var WebGLProgram: { new(): WebGLProgram; }; -interface WebGLQuery extends WebGLObject { +interface WebGLQuery { } declare var WebGLQuery: { @@ -17417,7 +17409,7 @@ declare var WebGLQuery: { }; /** Part of the WebGL API and represents a buffer that can contain an image, or can be source or target of an rendering operation. */ -interface WebGLRenderbuffer extends WebGLObject { +interface WebGLRenderbuffer { } declare var WebGLRenderbuffer: { @@ -18196,7 +18188,7 @@ interface WebGLRenderingContextOverloads { uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void; } -interface WebGLSampler extends WebGLObject { +interface WebGLSampler { } declare var WebGLSampler: { @@ -18205,7 +18197,7 @@ declare var WebGLSampler: { }; /** The WebGLShader is part of the WebGL API and can either be a vertex or a fragment shader. A WebGLProgram requires both types of shaders. */ -interface WebGLShader extends WebGLObject { +interface WebGLShader { } declare var WebGLShader: { @@ -18225,7 +18217,7 @@ declare var WebGLShaderPrecisionFormat: { new(): WebGLShaderPrecisionFormat; }; -interface WebGLSync extends WebGLObject { +interface WebGLSync { } declare var WebGLSync: { @@ -18234,7 +18226,7 @@ declare var WebGLSync: { }; /** Part of the WebGL API and represents an opaque texture object providing storage and state for texturing operations. */ -interface WebGLTexture extends WebGLObject { +interface WebGLTexture { } declare var WebGLTexture: { @@ -18242,7 +18234,7 @@ declare var WebGLTexture: { new(): WebGLTexture; }; -interface WebGLTransformFeedback extends WebGLObject { +interface WebGLTransformFeedback { } declare var WebGLTransformFeedback: { @@ -18259,7 +18251,7 @@ declare var WebGLUniformLocation: { new(): WebGLUniformLocation; }; -interface WebGLVertexArrayObject extends WebGLObject { +interface WebGLVertexArrayObject { } declare var WebGLVertexArrayObject: { @@ -18267,7 +18259,7 @@ declare var WebGLVertexArrayObject: { new(): WebGLVertexArrayObject; }; -interface WebGLVertexArrayObjectOES extends WebGLObject { +interface WebGLVertexArrayObjectOES { } interface WebKitPoint { diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index 934c5cea4..6e1a6e6f9 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -4401,7 +4401,7 @@ declare var WebGLActiveInfo: { }; /** Part of the WebGL API and represents an opaque buffer object storing data such as vertices or colors. */ -interface WebGLBuffer extends WebGLObject { +interface WebGLBuffer { } declare var WebGLBuffer: { @@ -4420,7 +4420,7 @@ declare var WebGLContextEvent: { }; /** Part of the WebGL API and represents a collection of buffers that serve as a rendering destination. */ -interface WebGLFramebuffer extends WebGLObject { +interface WebGLFramebuffer { } declare var WebGLFramebuffer: { @@ -4428,16 +4428,8 @@ declare var WebGLFramebuffer: { new(): WebGLFramebuffer; }; -interface WebGLObject { -} - -declare var WebGLObject: { - prototype: WebGLObject; - new(): WebGLObject; -}; - /** The WebGLProgram is part of the WebGL API and is a combination of two compiled WebGLShaders consisting of a vertex shader and a fragment shader (both written in GLSL). */ -interface WebGLProgram extends WebGLObject { +interface WebGLProgram { } declare var WebGLProgram: { @@ -4445,7 +4437,7 @@ declare var WebGLProgram: { new(): WebGLProgram; }; -interface WebGLQuery extends WebGLObject { +interface WebGLQuery { } declare var WebGLQuery: { @@ -4454,7 +4446,7 @@ declare var WebGLQuery: { }; /** Part of the WebGL API and represents a buffer that can contain an image, or can be source or target of an rendering operation. */ -interface WebGLRenderbuffer extends WebGLObject { +interface WebGLRenderbuffer { } declare var WebGLRenderbuffer: { @@ -5233,7 +5225,7 @@ interface WebGLRenderingContextOverloads { uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void; } -interface WebGLSampler extends WebGLObject { +interface WebGLSampler { } declare var WebGLSampler: { @@ -5242,7 +5234,7 @@ declare var WebGLSampler: { }; /** The WebGLShader is part of the WebGL API and can either be a vertex or a fragment shader. A WebGLProgram requires both types of shaders. */ -interface WebGLShader extends WebGLObject { +interface WebGLShader { } declare var WebGLShader: { @@ -5262,7 +5254,7 @@ declare var WebGLShaderPrecisionFormat: { new(): WebGLShaderPrecisionFormat; }; -interface WebGLSync extends WebGLObject { +interface WebGLSync { } declare var WebGLSync: { @@ -5271,7 +5263,7 @@ declare var WebGLSync: { }; /** Part of the WebGL API and represents an opaque texture object providing storage and state for texturing operations. */ -interface WebGLTexture extends WebGLObject { +interface WebGLTexture { } declare var WebGLTexture: { @@ -5279,7 +5271,7 @@ declare var WebGLTexture: { new(): WebGLTexture; }; -interface WebGLTransformFeedback extends WebGLObject { +interface WebGLTransformFeedback { } declare var WebGLTransformFeedback: { @@ -5296,7 +5288,7 @@ declare var WebGLUniformLocation: { new(): WebGLUniformLocation; }; -interface WebGLVertexArrayObject extends WebGLObject { +interface WebGLVertexArrayObject { } declare var WebGLVertexArrayObject: { @@ -5304,7 +5296,7 @@ declare var WebGLVertexArrayObject: { new(): WebGLVertexArrayObject; }; -interface WebGLVertexArrayObjectOES extends WebGLObject { +interface WebGLVertexArrayObjectOES { } interface WebSocketEventMap { diff --git a/inputfiles/removedTypes.json b/inputfiles/removedTypes.json index c3728d711..683f89513 100644 --- a/inputfiles/removedTypes.json +++ b/inputfiles/removedTypes.json @@ -353,6 +353,43 @@ } }, "VideoTrackList": null, + "WebGLBuffer": { + "extends": null + }, + "WebGLFramebuffer": { + "extends": null + }, + "WebGLObject": null, + "WebGLProgram": { + "extends": null + }, + "WebGLQuery": { + "extends": null + }, + "WebGLRenderbuffer": { + "extends": null + }, + "WebGLSampler": { + "extends": null + }, + "WebGLShader": { + "extends": null + }, + "WebGLSync": { + "extends": null + }, + "WebGLTexture": { + "extends": null + }, + "WebGLTransformFeedback": { + "extends": null + }, + "WebGLVertexArrayObject": { + "extends": null + }, + "WebGLVertexArrayObjectOES": { + "extends": null + }, "WebKitCSSMatrix": null, "WebKitDirectoryEntry": null, "WebKitDirectoryReader": null, From f9668affbfbf993bcdf8ce626dc868ef07a7acd6 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sun, 25 Oct 2020 03:25:14 +0100 Subject: [PATCH 05/18] Remove unimplemented WebVR APIs --- baselines/dom.generated.d.ts | 10 ---------- inputfiles/removedTypes.json | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index df0da2145..f0147b210 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -16138,7 +16138,6 @@ interface VRPose { readonly linearVelocity: Float32Array | null; readonly orientation: Float32Array | null; readonly position: Float32Array | null; - readonly timestamp: number; } declare var VRPose: { @@ -18452,9 +18451,6 @@ interface WindowEventMap extends GlobalEventHandlersEventMap, WindowEventHandler "vrdisplayconnect": Event; "vrdisplaydeactivate": Event; "vrdisplaydisconnect": Event; - "vrdisplayfocus": Event; - "vrdisplaypointerrestricted": Event; - "vrdisplaypointerunrestricted": Event; "vrdisplaypresentchange": Event; "waiting": Event; } @@ -18515,9 +18511,6 @@ interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandler onvrdisplayconnect: ((this: Window, ev: Event) => any) | null; onvrdisplaydeactivate: ((this: Window, ev: Event) => any) | null; onvrdisplaydisconnect: ((this: Window, ev: Event) => any) | null; - onvrdisplayfocus: ((this: Window, ev: Event) => any) | null; - onvrdisplaypointerrestricted: ((this: Window, ev: Event) => any) | null; - onvrdisplaypointerunrestricted: ((this: Window, ev: Event) => any) | null; onvrdisplaypresentchange: ((this: Window, ev: Event) => any) | null; opener: any; /** @deprecated */ @@ -19555,9 +19548,6 @@ declare var onvrdisplayblur: ((this: Window, ev: Event) => any) | null; declare var onvrdisplayconnect: ((this: Window, ev: Event) => any) | null; declare var onvrdisplaydeactivate: ((this: Window, ev: Event) => any) | null; declare var onvrdisplaydisconnect: ((this: Window, ev: Event) => any) | null; -declare var onvrdisplayfocus: ((this: Window, ev: Event) => any) | null; -declare var onvrdisplaypointerrestricted: ((this: Window, ev: Event) => any) | null; -declare var onvrdisplaypointerunrestricted: ((this: Window, ev: Event) => any) | null; declare var onvrdisplaypresentchange: ((this: Window, ev: Event) => any) | null; declare var opener: any; /** @deprecated */ diff --git a/inputfiles/removedTypes.json b/inputfiles/removedTypes.json index 683f89513..f33936589 100644 --- a/inputfiles/removedTypes.json +++ b/inputfiles/removedTypes.json @@ -353,6 +353,13 @@ } }, "VideoTrackList": null, + "VRPose": { + "properties": { + "property": { + "timestamp": null + } + } + }, "WebGLBuffer": { "extends": null }, @@ -408,6 +415,9 @@ "ontouchend": null, "ontouchmove": null, "ontouchstart": null, + "onvrdisplayfocus": null, + "onvrdisplaypointerrestricted": null, + "onvrdisplaypointerunrestricted": null, "performance": null } }, From b925d0483e7b4f7d82e311727a885991553a2122 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sun, 25 Oct 2020 03:17:05 +0100 Subject: [PATCH 06/18] Remove unimplemented TextTrack#sourceBuffer --- baselines/dom.generated.d.ts | 1 - inputfiles/removedTypes.json | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index f0147b210..d72ec103f 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -15700,7 +15700,6 @@ interface TextTrack extends EventTarget { */ mode: TextTrackMode; oncuechange: ((this: TextTrack, ev: Event) => any) | null; - readonly sourceBuffer: SourceBuffer | null; /** * Adds the given cue to textTrack's text track list of cues. */ diff --git a/inputfiles/removedTypes.json b/inputfiles/removedTypes.json index f33936589..cbb0ace1a 100644 --- a/inputfiles/removedTypes.json +++ b/inputfiles/removedTypes.json @@ -352,6 +352,13 @@ } } }, + "TextTrack": { + "properties": { + "property": { + "sourceBuffer": null + } + } + }, "VideoTrackList": null, "VRPose": { "properties": { From 456a2a8c38ea76b74f4e398d9e390c3795da3509 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sun, 25 Oct 2020 03:02:06 +0100 Subject: [PATCH 07/18] Remove unexposed TextMetrics APIs --- baselines/dom.generated.d.ts | 28 ---------------------------- baselines/webworker.generated.d.ts | 28 ---------------------------- inputfiles/removedTypes.json | 13 +++++++++++++ 3 files changed, 13 insertions(+), 56 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index d72ec103f..5a8cffb72 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -15616,34 +15616,6 @@ interface TextMetrics { * Returns the measurement described below. */ readonly actualBoundingBoxRight: number; - /** - * Returns the measurement described below. - */ - readonly alphabeticBaseline: number; - /** - * Returns the measurement described below. - */ - readonly emHeightAscent: number; - /** - * Returns the measurement described below. - */ - readonly emHeightDescent: number; - /** - * Returns the measurement described below. - */ - readonly fontBoundingBoxAscent: number; - /** - * Returns the measurement described below. - */ - readonly fontBoundingBoxDescent: number; - /** - * Returns the measurement described below. - */ - readonly hangingBaseline: number; - /** - * Returns the measurement described below. - */ - readonly ideographicBaseline: number; /** * Returns the measurement described below. */ diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index 6e1a6e6f9..50b07cb63 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -3188,34 +3188,6 @@ interface TextMetrics { * Returns the measurement described below. */ readonly actualBoundingBoxRight: number; - /** - * Returns the measurement described below. - */ - readonly alphabeticBaseline: number; - /** - * Returns the measurement described below. - */ - readonly emHeightAscent: number; - /** - * Returns the measurement described below. - */ - readonly emHeightDescent: number; - /** - * Returns the measurement described below. - */ - readonly fontBoundingBoxAscent: number; - /** - * Returns the measurement described below. - */ - readonly fontBoundingBoxDescent: number; - /** - * Returns the measurement described below. - */ - readonly hangingBaseline: number; - /** - * Returns the measurement described below. - */ - readonly ideographicBaseline: number; /** * Returns the measurement described below. */ diff --git a/inputfiles/removedTypes.json b/inputfiles/removedTypes.json index cbb0ace1a..14a414d4f 100644 --- a/inputfiles/removedTypes.json +++ b/inputfiles/removedTypes.json @@ -352,6 +352,19 @@ } } }, + "TextMetrics": { + "properties": { + "property": { + "alphabeticBaseline": null, + "emHeightAscent": null, + "emHeightDescent": null, + "fontBoundingBoxAscent": null, + "fontBoundingBoxDescent": null, + "hangingBaseline": null, + "ideographicBaseline": null + } + } + }, "TextTrack": { "properties": { "property": { From 6727b2223ffff7997ee09d6a9a6188eb57221fe3 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sun, 25 Oct 2020 02:56:22 +0100 Subject: [PATCH 08/18] Remove unimplemented SVGUseElement properties --- baselines/dom.generated.d.ts | 10 ++-------- inputfiles/removedTypes.json | 9 +++++++++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 5a8cffb72..8c1a03f29 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -14700,9 +14700,7 @@ declare var SVGUnitTypes: { /** Corresponds to the element. */ interface SVGUseElement extends SVGGraphicsElement, SVGURIReference { - readonly animatedInstanceRoot: SVGElementInstance | null; readonly height: SVGAnimatedLength; - readonly instanceRoot: SVGElementInstance | null; readonly width: SVGAnimatedLength; readonly x: SVGAnimatedLength; readonly y: SVGAnimatedLength; @@ -14735,16 +14733,12 @@ declare var SVGViewElement: { readonly SVG_ZOOMANDPAN_UNKNOWN: number; }; -/** Used to reflect the zoomAndPan attribute, and is mixed in to other interfaces for elements that support this attribute. */ interface SVGZoomAndPan { - readonly zoomAndPan: number; -} - -declare var SVGZoomAndPan: { + zoomAndPan: number; readonly SVG_ZOOMANDPAN_DISABLE: number; readonly SVG_ZOOMANDPAN_MAGNIFY: number; readonly SVG_ZOOMANDPAN_UNKNOWN: number; -}; +} interface SVGZoomEvent extends UIEvent { readonly newScale: number; diff --git a/inputfiles/removedTypes.json b/inputfiles/removedTypes.json index 14a414d4f..0da4b1653 100644 --- a/inputfiles/removedTypes.json +++ b/inputfiles/removedTypes.json @@ -352,6 +352,15 @@ } } }, + "SVGUseElement": { + "properties": { + "property": { + "animatedInstanceRoot": null, + "instanceRoot": null + } + } + }, + "SVGZoomAndPan": null, "TextMetrics": { "properties": { "property": { From 24a00fc8865f07947779e8554eabd427f5ffb774 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sun, 25 Oct 2020 02:06:14 +0100 Subject: [PATCH 09/18] Update WebRTC types --- baselines/dom.generated.d.ts | 79 +++++------------- inputfiles/idl/WebRTC.widl | 138 ++++++++++---------------------- inputfiles/overridingTypes.json | 4 - inputfiles/removedTypes.json | 15 +++- 4 files changed, 72 insertions(+), 164 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 8c1a03f29..8595cd256 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -1154,12 +1154,11 @@ interface RTCConfiguration { iceCandidatePoolSize?: number; iceServers?: RTCIceServer[]; iceTransportPolicy?: RTCIceTransportPolicy; - peerIdentity?: string; rtcpMuxPolicy?: RTCRtcpMuxPolicy; } interface RTCDTMFToneChangeEventInit extends EventInit { - tone: string; + tone?: string; } interface RTCDataChannelEventInit extends EventInit { @@ -1172,7 +1171,6 @@ interface RTCDataChannelInit { maxRetransmits?: number; negotiated?: boolean; ordered?: boolean; - priority?: RTCPriorityType; protocol?: string; } @@ -1192,7 +1190,6 @@ interface RTCErrorEventInit extends EventInit { interface RTCErrorInit { errorDetail: RTCErrorDetailType; - httpRequestStatusCode?: number; receivedAlert?: number; sctpCauseCode?: number; sdpLineNumber?: number; @@ -1263,7 +1260,7 @@ interface RTCIceParameters { } interface RTCIceServer { - credential?: string | RTCOAuthCredential; + credential?: string; credentialType?: RTCIceCredentialType; urls: string | string[]; username?: string; @@ -1283,6 +1280,11 @@ interface RTCInboundRTPStreamStats extends RTCRTPStreamStats { packetsReceived?: number; } +interface RTCLocalSessionDescriptionInit { + sdp?: string; + type?: RTCSdpType; +} + interface RTCMediaStreamTrackStats extends RTCStats { audioLevel?: number; echoReturnLoss?: number; @@ -1300,13 +1302,7 @@ interface RTCMediaStreamTrackStats extends RTCStats { trackIdentifier?: string; } -interface RTCOAuthCredential { - accessToken: string; - macKey: string; -} - interface RTCOfferAnswerOptions { - voiceActivityDetection?: boolean; } interface RTCOfferOptions extends RTCOfferAnswerOptions { @@ -1323,8 +1319,9 @@ interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats { } interface RTCPeerConnectionIceErrorEventInit extends EventInit { + address?: string | null; errorCode: number; - hostCandidate?: string; + port?: number | null; statusText?: string; url?: string; } @@ -1389,16 +1386,9 @@ interface RTCRtpContributingSource { timestamp: number; } -interface RTCRtpDecodingParameters extends RTCRtpCodingParameters { -} - interface RTCRtpEncodingParameters extends RTCRtpCodingParameters { active?: boolean; - codecPayloadType?: number; - dtx?: RTCDtxStatus; maxBitrate?: number; - maxFramerate?: number; - ptime?: number; scaleResolutionDownBy?: number; } @@ -1431,7 +1421,6 @@ interface RTCRtpParameters { } interface RTCRtpReceiveParameters extends RTCRtpParameters { - encodings: RTCRtpDecodingParameters[]; } interface RTCRtpRtxParameters { @@ -1439,9 +1428,7 @@ interface RTCRtpRtxParameters { } interface RTCRtpSendParameters extends RTCRtpParameters { - degradationPreference?: RTCDegradationPreference; encodings: RTCRtpEncodingParameters[]; - priority?: RTCPriorityType; transactionId: string; } @@ -1463,7 +1450,7 @@ interface RTCRtpUnhandled { interface RTCSessionDescriptionInit { sdp?: string; - type?: RTCSdpType; + type: RTCSdpType; } interface RTCSrtpKeyParam { @@ -1492,10 +1479,6 @@ interface RTCStats { type: RTCStatsType; } -interface RTCStatsEventInit extends EventInit { - report: RTCStatsReport; -} - interface RTCStatsReport { } @@ -4684,7 +4667,6 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "RTCPeerConnectionIceErrorEvent"): RTCPeerConnectionIceErrorEvent; createEvent(eventInterface: "RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent; createEvent(eventInterface: "RTCSsrcConflictEvent"): RTCSsrcConflictEvent; - createEvent(eventInterface: "RTCStatsEvent"): RTCStatsEvent; createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEvent; createEvent(eventInterface: "SVGZoomEvent"): SVGZoomEvent; createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; @@ -4934,7 +4916,6 @@ interface DocumentEvent { createEvent(eventInterface: "RTCPeerConnectionIceErrorEvent"): RTCPeerConnectionIceErrorEvent; createEvent(eventInterface: "RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent; createEvent(eventInterface: "RTCSsrcConflictEvent"): RTCSsrcConflictEvent; - createEvent(eventInterface: "RTCStatsEvent"): RTCStatsEvent; createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEvent; createEvent(eventInterface: "SVGZoomEvent"): SVGZoomEvent; createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; @@ -11893,7 +11874,6 @@ interface RTCCertificate { declare var RTCCertificate: { prototype: RTCCertificate; new(): RTCCertificate; - getSupportedAlgorithms(): AlgorithmIdentifier[]; }; interface RTCDTMFSenderEventMap { @@ -11923,7 +11903,7 @@ interface RTCDTMFToneChangeEvent extends Event { declare var RTCDTMFToneChangeEvent: { prototype: RTCDTMFToneChangeEvent; - new(type: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent; + new(type: string, eventInitDict?: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent; }; interface RTCDataChannelEventMap { @@ -11935,7 +11915,7 @@ interface RTCDataChannelEventMap { } interface RTCDataChannel extends EventTarget { - binaryType: string; + binaryType: BinaryType; readonly bufferedAmount: number; bufferedAmountLowThreshold: number; readonly id: number | null; @@ -11949,7 +11929,6 @@ interface RTCDataChannel extends EventTarget { onmessage: ((this: RTCDataChannel, ev: MessageEvent) => any) | null; onopen: ((this: RTCDataChannel, ev: Event) => any) | null; readonly ordered: boolean; - readonly priority: RTCPriorityType; readonly protocol: string; readonly readyState: RTCDataChannelState; close(): void; @@ -12033,7 +12012,6 @@ declare var RTCDtmfSender: { interface RTCError extends DOMException { readonly errorDetail: RTCErrorDetailType; - readonly httpRequestStatusCode: number | null; readonly receivedAlert: number | null; readonly sctpCauseCode: number | null; readonly sdpLineNumber: number | null; @@ -12126,7 +12104,6 @@ interface RTCIceTransportEventMap { /** Provides access to information about the ICE transport layer over which the data is being sent and received. */ interface RTCIceTransport extends EventTarget { - readonly component: RTCIceComponent; readonly gatheringState: RTCIceGathererState; ongatheringstatechange: ((this: RTCIceTransport, ev: Event) => any) | null; onselectedcandidatepairchange: ((this: RTCIceTransport, ev: Event) => any) | null; @@ -12177,7 +12154,6 @@ interface RTCPeerConnectionEventMap { "icegatheringstatechange": Event; "negotiationneeded": Event; "signalingstatechange": Event; - "statsended": RTCStatsEvent; "track": RTCTrackEvent; } @@ -12200,7 +12176,6 @@ interface RTCPeerConnection extends EventTarget { onicegatheringstatechange: ((this: RTCPeerConnection, ev: Event) => any) | null; onnegotiationneeded: ((this: RTCPeerConnection, ev: Event) => any) | null; onsignalingstatechange: ((this: RTCPeerConnection, ev: Event) => any) | null; - onstatsended: ((this: RTCPeerConnection, ev: RTCStatsEvent) => any) | null; ontrack: ((this: RTCPeerConnection, ev: RTCTrackEvent) => any) | null; readonly peerIdentity: Promise; readonly pendingLocalDescription: RTCSessionDescription | null; @@ -12222,7 +12197,8 @@ interface RTCPeerConnection extends EventTarget { getStats(selector?: MediaStreamTrack | null): Promise; getTransceivers(): RTCRtpTransceiver[]; removeTrack(sender: RTCRtpSender): void; - setConfiguration(configuration: RTCConfiguration): void; + restartIce(): void; + setConfiguration(configuration?: RTCConfiguration): void; setIdentityProvider(provider: string, options?: RTCIdentityProviderOptions): void; setLocalDescription(description: RTCSessionDescriptionInit): Promise; setRemoteDescription(description: RTCSessionDescriptionInit): Promise; @@ -12236,13 +12212,13 @@ declare var RTCPeerConnection: { prototype: RTCPeerConnection; new(configuration?: RTCConfiguration): RTCPeerConnection; generateCertificate(keygenAlgorithm: AlgorithmIdentifier): Promise; - getDefaultIceServers(): RTCIceServer[]; }; interface RTCPeerConnectionIceErrorEvent extends Event { + readonly address: string | null; readonly errorCode: number; readonly errorText: string; - readonly hostCandidate: string; + readonly port: number | null; readonly url: string; } @@ -12254,7 +12230,6 @@ declare var RTCPeerConnectionIceErrorEvent: { /** Events that occurs in relation to ICE candidates with the target, usually an RTCPeerConnection. Only one event is of this type: icecandidate. */ interface RTCPeerConnectionIceEvent extends Event { readonly candidate: RTCIceCandidate | null; - readonly url: string | null; } declare var RTCPeerConnectionIceEvent: { @@ -12264,7 +12239,6 @@ declare var RTCPeerConnectionIceEvent: { /** This WebRTC API interface manages the reception and decoding of data for a MediaStreamTrack on an RTCPeerConnection. */ interface RTCRtpReceiver { - readonly rtcpTransport: RTCDtlsTransport | null; readonly track: MediaStreamTrack; readonly transport: RTCDtlsTransport | null; getContributingSources(): RTCRtpContributingSource[]; @@ -12282,7 +12256,6 @@ declare var RTCRtpReceiver: { /** Provides the ability to control and obtain details about how a particular MediaStreamTrack is encoded and sent to a remote peer. */ interface RTCRtpSender { readonly dtmf: RTCDTMFSender | null; - readonly rtcpTransport: RTCDtlsTransport | null; readonly track: MediaStreamTrack | null; readonly transport: RTCDtlsTransport | null; getParameters(): RTCRtpSendParameters; @@ -12343,7 +12316,7 @@ interface RTCSessionDescription { declare var RTCSessionDescription: { prototype: RTCSessionDescription; - new(descriptionInitDict?: RTCSessionDescriptionInit): RTCSessionDescription; + new(descriptionInitDict: RTCSessionDescriptionInit): RTCSessionDescription; }; interface RTCSrtpSdesTransportEventMap { @@ -12374,15 +12347,6 @@ declare var RTCSsrcConflictEvent: { new(): RTCSsrcConflictEvent; }; -interface RTCStatsEvent extends Event { - readonly report: RTCStatsReport; -} - -declare var RTCStatsEvent: { - prototype: RTCStatsEvent; - new(type: string, eventInitDict: RTCStatsEventInit): RTCStatsEvent; -}; - interface RTCStatsProvider extends EventTarget { getStats(): Promise; msGetStats(): Promise; @@ -20025,15 +19989,13 @@ type PushEncryptionKeyName = "auth" | "p256dh"; type PushPermissionState = "denied" | "granted" | "prompt"; type RTCBundlePolicy = "balanced" | "max-bundle" | "max-compat"; type RTCDataChannelState = "closed" | "closing" | "connecting" | "open"; -type RTCDegradationPreference = "balanced" | "maintain-framerate" | "maintain-resolution"; type RTCDtlsRole = "auto" | "client" | "server"; type RTCDtlsTransportState = "closed" | "connected" | "connecting" | "failed" | "new"; -type RTCDtxStatus = "disabled" | "enabled"; -type RTCErrorDetailType = "data-channel-failure" | "dtls-failure" | "fingerprint-failure" | "hardware-encoder-error" | "hardware-encoder-not-available" | "idp-bad-script-failure" | "idp-execution-failure" | "idp-load-failure" | "idp-need-login" | "idp-timeout" | "idp-tls-failure" | "idp-token-expired" | "idp-token-invalid" | "sctp-failure" | "sdp-syntax-error"; +type RTCErrorDetailType = "data-channel-failure" | "dtls-failure" | "fingerprint-failure" | "hardware-encoder-error" | "hardware-encoder-not-available" | "sctp-failure" | "sdp-syntax-error"; type RTCIceCandidateType = "host" | "prflx" | "relay" | "srflx"; type RTCIceComponent = "rtcp" | "rtp"; type RTCIceConnectionState = "checking" | "closed" | "completed" | "connected" | "disconnected" | "failed" | "new"; -type RTCIceCredentialType = "oauth" | "password"; +type RTCIceCredentialType = "password"; type RTCIceGatherPolicy = "all" | "nohost" | "relay"; type RTCIceGathererState = "complete" | "gathering" | "new"; type RTCIceGatheringState = "complete" | "gathering" | "new"; @@ -20043,8 +20005,7 @@ type RTCIceTcpCandidateType = "active" | "passive" | "so"; type RTCIceTransportPolicy = "all" | "relay"; type RTCIceTransportState = "checking" | "closed" | "completed" | "connected" | "disconnected" | "failed" | "new"; type RTCPeerConnectionState = "closed" | "connected" | "connecting" | "disconnected" | "failed" | "new"; -type RTCPriorityType = "high" | "low" | "medium" | "very-low"; -type RTCRtcpMuxPolicy = "negotiate" | "require"; +type RTCRtcpMuxPolicy = "require"; type RTCRtpTransceiverDirection = "inactive" | "recvonly" | "sendonly" | "sendrecv" | "stopped"; type RTCSctpTransportState = "closed" | "connected" | "connecting"; type RTCSdpType = "answer" | "offer" | "pranswer" | "rollback"; diff --git a/inputfiles/idl/WebRTC.widl b/inputfiles/idl/WebRTC.widl index 4fdc00497..b8ddca528 100644 --- a/inputfiles/idl/WebRTC.widl +++ b/inputfiles/idl/WebRTC.widl @@ -3,25 +3,18 @@ dictionary RTCConfiguration { RTCIceTransportPolicy iceTransportPolicy; RTCBundlePolicy bundlePolicy; RTCRtcpMuxPolicy rtcpMuxPolicy; - DOMString peerIdentity; sequence certificates; [EnforceRange] octet iceCandidatePoolSize = 0; }; enum RTCIceCredentialType { - "password", - "oauth" -}; - -dictionary RTCOAuthCredential { - required DOMString macKey; - required DOMString accessToken; + "password" }; dictionary RTCIceServer { required (DOMString or sequence) urls; DOMString username; - (DOMString or RTCOAuthCredential) credential; + DOMString credential; RTCIceCredentialType credentialType = "password"; }; @@ -37,14 +30,10 @@ enum RTCBundlePolicy { }; enum RTCRtcpMuxPolicy { - // At risk due to lack of implementers' interest. - "negotiate", "require" }; -dictionary RTCOfferAnswerOptions { - boolean voiceActivityDetection = true; -}; +dictionary RTCOfferAnswerOptions {}; dictionary RTCOfferOptions : RTCOfferAnswerOptions { boolean iceRestart = false; @@ -91,25 +80,24 @@ interface RTCPeerConnection : EventTarget { constructor(optional RTCConfiguration configuration = {}); Promise createOffer(optional RTCOfferOptions options = {}); Promise createAnswer(optional RTCAnswerOptions options = {}); - Promise setLocalDescription(optional RTCSessionDescriptionInit description = {}); + Promise setLocalDescription(optional RTCLocalSessionDescriptionInit description = {}); readonly attribute RTCSessionDescription? localDescription; readonly attribute RTCSessionDescription? currentLocalDescription; readonly attribute RTCSessionDescription? pendingLocalDescription; - Promise setRemoteDescription(optional RTCSessionDescriptionInit description = {}); + Promise setRemoteDescription(RTCSessionDescriptionInit description); readonly attribute RTCSessionDescription? remoteDescription; readonly attribute RTCSessionDescription? currentRemoteDescription; readonly attribute RTCSessionDescription? pendingRemoteDescription; - Promise addIceCandidate(optional RTCIceCandidateInit candidate = {}); + Promise addIceCandidate(optional RTCIceCandidateInit candidate = {}); readonly attribute RTCSignalingState signalingState; readonly attribute RTCIceGatheringState iceGatheringState; readonly attribute RTCIceConnectionState iceConnectionState; readonly attribute RTCPeerConnectionState connectionState; readonly attribute boolean? canTrickleIceCandidates; - void restartIce(); - static sequence getDefaultIceServers(); + undefined restartIce(); RTCConfiguration getConfiguration(); - void setConfiguration(RTCConfiguration configuration); - void close(); + undefined setConfiguration(optional RTCConfiguration configuration = {}); + undefined close(); attribute EventHandler onnegotiationneeded; attribute EventHandler onicecandidate; attribute EventHandler onicecandidateerror; @@ -123,25 +111,25 @@ interface RTCPeerConnection : EventTarget { // If these methods are supported // they must be implemented as defined // in section "Legacy Interface Extensions" - Promise createOffer(RTCSessionDescriptionCallback successCallback, + Promise createOffer(RTCSessionDescriptionCallback successCallback, RTCPeerConnectionErrorCallback failureCallback, optional RTCOfferOptions options = {}); - Promise setLocalDescription(optional RTCSessionDescriptionInit description = {}, + Promise setLocalDescription(optional RTCLocalSessionDescriptionInit description = {}, VoidFunction successCallback, RTCPeerConnectionErrorCallback failureCallback); - Promise createAnswer(RTCSessionDescriptionCallback successCallback, + Promise createAnswer(RTCSessionDescriptionCallback successCallback, RTCPeerConnectionErrorCallback failureCallback); - Promise setRemoteDescription(optional RTCSessionDescriptionInit description = {}, + Promise setRemoteDescription(RTCSessionDescriptionInit description, VoidFunction successCallback, RTCPeerConnectionErrorCallback failureCallback); - Promise addIceCandidate(RTCIceCandidateInit candidate, + Promise addIceCandidate(RTCIceCandidateInit candidate, VoidFunction successCallback, RTCPeerConnectionErrorCallback failureCallback); }; -callback RTCPeerConnectionErrorCallback = void (DOMException error); +callback RTCPeerConnectionErrorCallback = undefined (DOMException error); -callback RTCSessionDescriptionCallback = void (RTCSessionDescriptionInit description); +callback RTCSessionDescriptionCallback = undefined (RTCSessionDescriptionInit description); partial dictionary RTCOfferOptions { boolean offerToReceiveAudio; @@ -157,13 +145,18 @@ enum RTCSdpType { [Exposed=Window] interface RTCSessionDescription { - constructor(optional RTCSessionDescriptionInit descriptionInitDict = {}); + constructor(RTCSessionDescriptionInit descriptionInitDict); readonly attribute RTCSdpType type; readonly attribute DOMString sdp; [Default] object toJSON(); }; dictionary RTCSessionDescriptionInit { + required RTCSdpType type; + DOMString sdp = ""; +}; + +dictionary RTCLocalSessionDescriptionInit { RTCSdpType type; DOMString sdp = ""; }; @@ -228,26 +221,21 @@ dictionary RTCPeerConnectionIceEventInit : EventInit { [Exposed=Window] interface RTCPeerConnectionIceErrorEvent : Event { constructor(DOMString type, RTCPeerConnectionIceErrorEventInit eventInitDict); - readonly attribute DOMString hostCandidate; + readonly attribute DOMString? address; + readonly attribute unsigned short? port; readonly attribute DOMString url; readonly attribute unsigned short errorCode; readonly attribute USVString errorText; }; dictionary RTCPeerConnectionIceErrorEventInit : EventInit { - DOMString hostCandidate; + DOMString? address; + unsigned short? port; DOMString url; required unsigned short errorCode; USVString statusText; }; -enum RTCPriorityType { - "very-low", - "low", - "medium", - "high" -}; - partial interface RTCPeerConnection { static Promise generateCertificate(AlgorithmIdentifier keygenAlgorithm); @@ -260,7 +248,6 @@ dictionary RTCCertificateExpiration { [Exposed=Window, Serializable] interface RTCCertificate { readonly attribute DOMTimeStamp expires; - static sequence getSupportedAlgorithms(); sequence getFingerprints(); }; @@ -269,7 +256,7 @@ partial interface RTCPeerConnection { sequence getReceivers(); sequence getTransceivers(); RTCRtpSender addTrack(MediaStreamTrack track, MediaStream... streams); - void removeTrack(RTCRtpSender sender); + undefined removeTrack(RTCRtpSender sender); RTCRtpTransceiver addTransceiver((MediaStreamTrack or DOMString) trackOrKind, optional RTCRtpTransceiverInit init = {}); attribute EventHandler ontrack; @@ -293,12 +280,11 @@ enum RTCRtpTransceiverDirection { interface RTCRtpSender { readonly attribute MediaStreamTrack? track; readonly attribute RTCDtlsTransport? transport; - readonly attribute RTCDtlsTransport? rtcpTransport; static RTCRtpCapabilities? getCapabilities(DOMString kind); - Promise setParameters(RTCRtpSendParameters parameters); + Promise setParameters(RTCRtpSendParameters parameters); RTCRtpSendParameters getParameters(); - Promise replaceTrack(MediaStreamTrack? withTrack); - void setStreams(MediaStream... streams); + Promise replaceTrack(MediaStreamTrack? withTrack); + undefined setStreams(MediaStream... streams); Promise getStats(); }; @@ -311,12 +297,9 @@ dictionary RTCRtpParameters { dictionary RTCRtpSendParameters : RTCRtpParameters { required DOMString transactionId; required sequence encodings; - RTCDegradationPreference degradationPreference = "balanced"; - RTCPriorityType priority = "low"; }; dictionary RTCRtpReceiveParameters : RTCRtpParameters { - required sequence encodings; }; dictionary RTCRtpCodingParameters { @@ -326,26 +309,11 @@ dictionary RTCRtpCodingParameters { dictionary RTCRtpDecodingParameters : RTCRtpCodingParameters {}; dictionary RTCRtpEncodingParameters : RTCRtpCodingParameters { - octet codecPayloadType; - RTCDtxStatus dtx; boolean active = true; - unsigned long ptime; unsigned long maxBitrate; - double maxFramerate; double scaleResolutionDownBy; }; -enum RTCDtxStatus { - "disabled", - "enabled" -}; - -enum RTCDegradationPreference { - "maintain-framerate", - "maintain-resolution", - "balanced" -}; - dictionary RTCRtcpParameters { DOMString cname; boolean reducedSize; @@ -385,7 +353,6 @@ dictionary RTCRtpHeaderExtensionCapability { interface RTCRtpReceiver { readonly attribute MediaStreamTrack track; readonly attribute RTCDtlsTransport? transport; - readonly attribute RTCDtlsTransport? rtcpTransport; static RTCRtpCapabilities? getCapabilities(DOMString kind); RTCRtpReceiveParameters getParameters(); sequence getContributingSources(); @@ -411,8 +378,8 @@ interface RTCRtpTransceiver { [SameObject] readonly attribute RTCRtpReceiver receiver; attribute RTCRtpTransceiverDirection direction; readonly attribute RTCRtpTransceiverDirection? currentDirection; - void stop(); - void setCodecPreferences(sequence codecs); + undefined stop(); + undefined setCodecPreferences(sequence codecs); }; [Exposed=Window] @@ -537,7 +504,6 @@ interface RTCDataChannel : EventTarget { readonly attribute USVString protocol; readonly attribute boolean negotiated; readonly attribute unsigned short? id; - readonly attribute RTCPriorityType priority; readonly attribute RTCDataChannelState readyState; readonly attribute unsigned long bufferedAmount; [EnforceRange] attribute unsigned long bufferedAmountLowThreshold; @@ -546,13 +512,13 @@ interface RTCDataChannel : EventTarget { attribute EventHandler onerror; attribute EventHandler onclosing; attribute EventHandler onclose; - void close(); + undefined close(); attribute EventHandler onmessage; - attribute DOMString binaryType; - void send(USVString data); - void send(Blob data); - void send(ArrayBuffer data); - void send(ArrayBufferView data); + attribute BinaryType binaryType; + undefined send(USVString data); + undefined send(Blob data); + undefined send(ArrayBuffer data); + undefined send(ArrayBufferView data); }; dictionary RTCDataChannelInit { @@ -562,7 +528,6 @@ dictionary RTCDataChannelInit { USVString protocol = ""; boolean negotiated = false; [EnforceRange] unsigned short id; - RTCPriorityType priority = "low"; }; enum RTCDataChannelState { @@ -588,7 +553,7 @@ partial interface RTCRtpSender { [Exposed=Window] interface RTCDTMFSender : EventTarget { - void insertDTMF(DOMString tones, optional unsigned long duration = 100, optional unsigned long interToneGap = 70); + undefined insertDTMF(DOMString tones, optional unsigned long duration = 100, optional unsigned long interToneGap = 70); attribute EventHandler ontonechange; readonly attribute boolean canInsertDTMF; readonly attribute DOMString toneBuffer; @@ -596,17 +561,16 @@ interface RTCDTMFSender : EventTarget { [Exposed=Window] interface RTCDTMFToneChangeEvent : Event { - constructor(DOMString type, RTCDTMFToneChangeEventInit eventInitDict); + constructor(DOMString type, optional RTCDTMFToneChangeEventInit eventInitDict = {}); readonly attribute DOMString tone; }; dictionary RTCDTMFToneChangeEventInit : EventInit { - required DOMString tone; + DOMString tone = ""; }; partial interface RTCPeerConnection { Promise getStats(optional MediaStreamTrack? selector = null); - attribute EventHandler onstatsended; }; [Exposed=Window] @@ -620,22 +584,11 @@ dictionary RTCStats { required DOMString id; }; -[Exposed=Window] -interface RTCStatsEvent : Event { - constructor(DOMString type, RTCStatsEventInit eventInitDict); - readonly attribute RTCStatsReport report; -}; - -dictionary RTCStatsEventInit : EventInit { - required RTCStatsReport report; -}; - [Exposed=Window] interface RTCError : DOMException { constructor(RTCErrorInit init, optional DOMString message = ""); readonly attribute RTCErrorDetailType errorDetail; readonly attribute long? sdpLineNumber; - readonly attribute long? httpRequestStatusCode; readonly attribute long? sctpCauseCode; readonly attribute unsigned long? receivedAlert; readonly attribute unsigned long? sentAlert; @@ -644,7 +597,6 @@ interface RTCError : DOMException { dictionary RTCErrorInit { required RTCErrorDetailType errorDetail; long sdpLineNumber; - long httpRequestStatusCode; long sctpCauseCode; unsigned long receivedAlert; unsigned long sentAlert; @@ -654,14 +606,6 @@ enum RTCErrorDetailType { "data-channel-failure", "dtls-failure", "fingerprint-failure", - "idp-bad-script-failure", - "idp-execution-failure", - "idp-load-failure", - "idp-need-login", - "idp-timeout", - "idp-tls-failure", - "idp-token-expired", - "idp-token-invalid", "sctp-failure", "sdp-syntax-error", "hardware-encoder-not-available", diff --git a/inputfiles/overridingTypes.json b/inputfiles/overridingTypes.json index 4408392f0..e35b7f8b9 100644 --- a/inputfiles/overridingTypes.json +++ b/inputfiles/overridingTypes.json @@ -1835,10 +1835,6 @@ { "name": "isolationchange", "type": "Event" - }, - { - "name": "statsended", - "type": "RTCStatsEvent" } ] } diff --git a/inputfiles/removedTypes.json b/inputfiles/removedTypes.json index 0da4b1653..6ddb81f7a 100644 --- a/inputfiles/removedTypes.json +++ b/inputfiles/removedTypes.json @@ -261,10 +261,17 @@ } } }, - "RTCPeerConnection": { - "methods": { - "method": { - "restartIce": null + "RTCIceTransport": { + "properties": { + "property": { + "component": null + } + } + }, + "RTCPeerConnectionIceEvent": { + "properties": { + "property": { + "url": null } } }, From c9d654f47e1f4d743afbc728b78af6277814813e Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sun, 25 Oct 2020 02:39:08 +0200 Subject: [PATCH 10/18] Add Payment Request types --- baselines/dom.generated.d.ts | 69 +++++++++- inputfiles/idl/Payment Request.widl | 188 ++++++++++++++++++++++++++++ inputfiles/idlSources.json | 4 + 3 files changed, 255 insertions(+), 6 deletions(-) create mode 100644 inputfiles/idl/Payment Request.widl diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 8595cd256..dd247de28 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -15,6 +15,19 @@ interface AddEventListenerOptions extends EventListenerOptions { passive?: boolean; } +interface AddressErrors { + addressLine?: string; + city?: string; + country?: string; + dependentLocality?: string; + organization?: string; + phone?: string; + postalCode?: string; + recipient?: string; + region?: string; + sortingCode?: string; +} + interface AesCbcParams extends Algorithm { iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; } @@ -940,9 +953,14 @@ interface PannerOptions extends AudioNodeOptions { rolloffFactor?: number; } +interface PayerErrors { + email?: string; + name?: string; + phone?: string; +} + interface PaymentCurrencyAmount { currency: string; - currencySystem?: string; value: string; } @@ -966,6 +984,9 @@ interface PaymentDetailsModifier { interface PaymentDetailsUpdate extends PaymentDetailsBase { error?: string; + payerErrors?: PayerErrors; + paymentMethodErrors?: any; + shippingAddressErrors?: AddressErrors; total?: PaymentItem; } @@ -975,17 +996,23 @@ interface PaymentItem { pending?: boolean; } +interface PaymentMethodChangeEventInit extends PaymentRequestUpdateEventInit { + methodDetails?: any; + methodName?: string; +} + interface PaymentMethodData { data?: any; supportedMethods: string | string[]; } interface PaymentOptions { + requestBillingAddress?: boolean; requestPayerEmail?: boolean; requestPayerName?: boolean; requestPayerPhone?: boolean; requestShipping?: boolean; - shippingType?: string; + shippingType?: PaymentShippingType; } interface PaymentRequestUpdateEventInit extends EventInit { @@ -998,6 +1025,13 @@ interface PaymentShippingOption { selected?: boolean; } +interface PaymentValidationErrors { + error?: string; + payer?: PayerErrors; + paymentMethod?: any; + shippingAddress?: AddressErrors; +} + interface Pbkdf2Params extends Algorithm { hash: HashAlgorithmIdentifier; iterations: number; @@ -4651,6 +4685,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent; createEvent(eventInterface: "OverflowEvent"): OverflowEvent; createEvent(eventInterface: "PageTransitionEvent"): PageTransitionEvent; + createEvent(eventInterface: "PaymentMethodChangeEvent"): PaymentMethodChangeEvent; createEvent(eventInterface: "PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent; createEvent(eventInterface: "PermissionRequestedEvent"): PermissionRequestedEvent; createEvent(eventInterface: "PointerEvent"): PointerEvent; @@ -4900,6 +4935,7 @@ interface DocumentEvent { createEvent(eventInterface: "OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent; createEvent(eventInterface: "OverflowEvent"): OverflowEvent; createEvent(eventInterface: "PageTransitionEvent"): PageTransitionEvent; + createEvent(eventInterface: "PaymentMethodChangeEvent"): PaymentMethodChangeEvent; createEvent(eventInterface: "PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent; createEvent(eventInterface: "PermissionRequestedEvent"): PermissionRequestedEvent; createEvent(eventInterface: "PointerEvent"): PointerEvent; @@ -11359,11 +11395,10 @@ declare var Path2D: { /** This Payment Request API interface is used to store shipping or payment address information. */ interface PaymentAddress { - readonly addressLine: string[]; + readonly addressLine: ReadonlyArray; readonly city: string; readonly country: string; readonly dependentLocality: string; - readonly languageCode: string; readonly organization: string; readonly phone: string; readonly postalCode: string; @@ -11378,7 +11413,18 @@ declare var PaymentAddress: { new(): PaymentAddress; }; +interface PaymentMethodChangeEvent extends PaymentRequestUpdateEvent { + readonly methodDetails: any; + readonly methodName: string; +} + +declare var PaymentMethodChangeEvent: { + prototype: PaymentMethodChangeEvent; + new(type: string, eventInitDict?: PaymentMethodChangeEventInit): PaymentMethodChangeEvent; +}; + interface PaymentRequestEventMap { + "paymentmethodchange": Event; "shippingaddresschange": Event; "shippingoptionchange": Event; } @@ -11386,6 +11432,7 @@ interface PaymentRequestEventMap { /** This Payment Request API interface is the primary access point into the API, and lets web content and apps accept payments from the end user. */ interface PaymentRequest extends EventTarget { readonly id: string; + onpaymentmethodchange: ((this: PaymentRequest, ev: Event) => any) | null; onshippingaddresschange: ((this: PaymentRequest, ev: Event) => any) | null; onshippingoptionchange: ((this: PaymentRequest, ev: Event) => any) | null; readonly shippingAddress: PaymentAddress | null; @@ -11393,7 +11440,7 @@ interface PaymentRequest extends EventTarget { readonly shippingType: PaymentShippingType | null; abort(): Promise; canMakePayment(): Promise; - show(): Promise; + show(detailsPromise: PaymentDetailsUpdate | Promise): Promise; addEventListener(type: K, listener: (this: PaymentRequest, ev: PaymentRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: PaymentRequest, ev: PaymentRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -11415,10 +11462,15 @@ declare var PaymentRequestUpdateEvent: { new(type: string, eventInitDict?: PaymentRequestUpdateEventInit): PaymentRequestUpdateEvent; }; +interface PaymentResponseEventMap { + "payerdetailchange": Event; +} + /** This Payment Request API interface is returned after a user selects a payment method and approves a payment request. */ -interface PaymentResponse { +interface PaymentResponse extends EventTarget { readonly details: any; readonly methodName: string; + onpayerdetailchange: ((this: PaymentResponse, ev: Event) => any) | null; readonly payerEmail: string | null; readonly payerName: string | null; readonly payerPhone: string | null; @@ -11426,7 +11478,12 @@ interface PaymentResponse { readonly shippingAddress: PaymentAddress | null; readonly shippingOption: string | null; complete(result?: PaymentComplete): Promise; + retry(errorFields?: PaymentValidationErrors): Promise; toJSON(): any; + addEventListener(type: K, listener: (this: PaymentResponse, ev: PaymentResponseEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: PaymentResponse, ev: PaymentResponseEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var PaymentResponse: { diff --git a/inputfiles/idl/Payment Request.widl b/inputfiles/idl/Payment Request.widl new file mode 100644 index 000000000..0b260ac7e --- /dev/null +++ b/inputfiles/idl/Payment Request.widl @@ -0,0 +1,188 @@ +[SecureContext, Exposed=Window] +interface PaymentRequest : EventTarget { + constructor( + sequence methodData, + PaymentDetailsInit details, + optional PaymentOptions options = {} + ); + [NewObject] + Promise show(optional Promise detailsPromise); + [NewObject] + Promise abort(); + [NewObject] + Promise canMakePayment(); + + readonly attribute DOMString id; + readonly attribute PaymentAddress? shippingAddress; + readonly attribute DOMString? shippingOption; + readonly attribute PaymentShippingType? shippingType; + + attribute EventHandler onshippingaddresschange; + attribute EventHandler onshippingoptionchange; + attribute EventHandler onpaymentmethodchange; +}; + +dictionary PaymentMethodData { + required DOMString supportedMethods; + object data; +}; + +dictionary PaymentCurrencyAmount { + required DOMString currency; + required DOMString value; +}; + +dictionary PaymentDetailsBase { + sequence displayItems; + sequence shippingOptions; + sequence modifiers; +}; + +dictionary PaymentDetailsInit : PaymentDetailsBase { + DOMString id; + required PaymentItem total; +}; + +dictionary PaymentDetailsUpdate : PaymentDetailsBase { + DOMString error; + PaymentItem total; + AddressErrors shippingAddressErrors; + PayerErrors payerErrors; + object paymentMethodErrors; +}; + +dictionary PaymentDetailsModifier { + required DOMString supportedMethods; + PaymentItem total; + sequence additionalDisplayItems; + object data; +}; + +enum PaymentShippingType { + "shipping", + "delivery", + "pickup" +}; + +dictionary PaymentOptions { + boolean requestPayerName = false; + boolean requestBillingAddress = false; + boolean requestPayerEmail = false; + boolean requestPayerPhone = false; + boolean requestShipping = false; + PaymentShippingType shippingType = "shipping"; +}; + +dictionary PaymentItem { + required DOMString label; + required PaymentCurrencyAmount amount; + boolean pending = false; +}; + +[SecureContext, Exposed=(Window)] +interface PaymentAddress { + [Default] object toJSON(); + readonly attribute DOMString city; + readonly attribute DOMString country; + readonly attribute DOMString dependentLocality; + readonly attribute DOMString organization; + readonly attribute DOMString phone; + readonly attribute DOMString postalCode; + readonly attribute DOMString recipient; + readonly attribute DOMString region; + readonly attribute DOMString sortingCode; + readonly attribute FrozenArray addressLine; +}; + +dictionary AddressInit { + DOMString country = ""; + sequence addressLine = []; + DOMString region = ""; + DOMString city = ""; + DOMString dependentLocality = ""; + DOMString postalCode = ""; + DOMString sortingCode = ""; + DOMString organization = ""; + DOMString recipient = ""; + DOMString phone = ""; +}; + +dictionary AddressErrors { + DOMString addressLine; + DOMString city; + DOMString country; + DOMString dependentLocality; + DOMString organization; + DOMString phone; + DOMString postalCode; + DOMString recipient; + DOMString region; + DOMString sortingCode; +}; + +dictionary PaymentShippingOption { + required DOMString id; + required DOMString label; + required PaymentCurrencyAmount amount; + boolean selected = false; +}; + +enum PaymentComplete { + "fail", + "success", + "unknown" +}; + +[SecureContext, Exposed=Window] +interface PaymentResponse : EventTarget { + [Default] object toJSON(); + + readonly attribute DOMString requestId; + readonly attribute DOMString methodName; + readonly attribute object details; + readonly attribute PaymentAddress? shippingAddress; + readonly attribute DOMString? shippingOption; + readonly attribute DOMString? payerName; + readonly attribute DOMString? payerEmail; + readonly attribute DOMString? payerPhone; + + [NewObject] + Promise complete(optional PaymentComplete result = "unknown"); + [NewObject] + Promise retry(optional PaymentValidationErrors errorFields = {}); + + attribute EventHandler onpayerdetailchange; +}; + +dictionary PaymentValidationErrors { + PayerErrors payer; + AddressErrors shippingAddress; + DOMString error; + object paymentMethod; +}; + +dictionary PayerErrors { + DOMString email; + DOMString name; + DOMString phone; +}; + +[SecureContext, Exposed=Window] +interface PaymentMethodChangeEvent : PaymentRequestUpdateEvent { + constructor(DOMString type, optional PaymentMethodChangeEventInit eventInitDict = {}); + readonly attribute DOMString methodName; + readonly attribute object? methodDetails; +}; + +dictionary PaymentMethodChangeEventInit : PaymentRequestUpdateEventInit { + DOMString methodName = ""; + object? methodDetails = null; +}; + +[SecureContext, Exposed=Window] +interface PaymentRequestUpdateEvent : Event { + constructor(DOMString type, optional PaymentRequestUpdateEventInit eventInitDict = {}); + undefined updateWith(Promise detailsPromise); +}; + +dictionary PaymentRequestUpdateEventInit : EventInit {}; diff --git a/inputfiles/idlSources.json b/inputfiles/idlSources.json index 2aa4073b8..e29635dab 100644 --- a/inputfiles/idlSources.json +++ b/inputfiles/idlSources.json @@ -434,6 +434,10 @@ "url": "https://www.w3.org/TR/push-api/", "title": "Push" }, + { + "url": "https://w3c.github.io/payment-request/", + "title": "Payment Request" + }, { "url": "https://www.w3.org/TR/referrer-policy/", "title": "Referrer Policy" From 2d549b1a02b7e7bdcf7d3ea6aa503068266b8866 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sun, 25 Oct 2020 02:09:41 +0200 Subject: [PATCH 11/18] Remove MediaStreamTrack isolation --- baselines/dom.generated.d.ts | 3 --- inputfiles/removedTypes.json | 8 ++++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index dd247de28..0cf07f0f6 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -10377,7 +10377,6 @@ declare var MediaStreamEvent: { interface MediaStreamTrackEventMap { "ended": Event; - "isolationchange": Event; "mute": Event; "unmute": Event; } @@ -10386,12 +10385,10 @@ interface MediaStreamTrackEventMap { interface MediaStreamTrack extends EventTarget { enabled: boolean; readonly id: string; - readonly isolated: boolean; readonly kind: string; readonly label: string; readonly muted: boolean; onended: ((this: MediaStreamTrack, ev: Event) => any) | null; - onisolationchange: ((this: MediaStreamTrack, ev: Event) => any) | null; onmute: ((this: MediaStreamTrack, ev: Event) => any) | null; onunmute: ((this: MediaStreamTrack, ev: Event) => any) | null; readonly readyState: MediaStreamTrackState; diff --git a/inputfiles/removedTypes.json b/inputfiles/removedTypes.json index 6ddb81f7a..1053ac3f3 100644 --- a/inputfiles/removedTypes.json +++ b/inputfiles/removedTypes.json @@ -232,6 +232,14 @@ } } }, + "MediaStreamTrack": { + "properties": { + "property": { + "isolated": null, + "onisolationchange": null + } + } + }, "MessageEvent": { "methods": { "method": { From 9bb7f4414f87726854e1b8097087b4f289705352 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sun, 25 Oct 2020 01:56:19 +0200 Subject: [PATCH 12/18] Remove MS-prefixed events --- baselines/dom.generated.d.ts | 132 ----------------------------------- inputfiles/removedTypes.json | 19 +++++ 2 files changed, 19 insertions(+), 132 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 0cf07f0f6..e01516018 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -4667,10 +4667,6 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "InputEvent"): InputEvent; createEvent(eventInterface: "KeyboardEvent"): KeyboardEvent; createEvent(eventInterface: "ListeningStateChangedEvent"): ListeningStateChangedEvent; - createEvent(eventInterface: "MSGestureEvent"): MSGestureEvent; - createEvent(eventInterface: "MSMediaKeyMessageEvent"): MSMediaKeyMessageEvent; - createEvent(eventInterface: "MSMediaKeyNeededEvent"): MSMediaKeyNeededEvent; - createEvent(eventInterface: "MSPointerEvent"): MSPointerEvent; createEvent(eventInterface: "MediaEncryptedEvent"): MediaEncryptedEvent; createEvent(eventInterface: "MediaKeyMessageEvent"): MediaKeyMessageEvent; createEvent(eventInterface: "MediaQueryListEvent"): MediaQueryListEvent; @@ -4917,10 +4913,6 @@ interface DocumentEvent { createEvent(eventInterface: "InputEvent"): InputEvent; createEvent(eventInterface: "KeyboardEvent"): KeyboardEvent; createEvent(eventInterface: "ListeningStateChangedEvent"): ListeningStateChangedEvent; - createEvent(eventInterface: "MSGestureEvent"): MSGestureEvent; - createEvent(eventInterface: "MSMediaKeyMessageEvent"): MSMediaKeyMessageEvent; - createEvent(eventInterface: "MSMediaKeyNeededEvent"): MSMediaKeyNeededEvent; - createEvent(eventInterface: "MSPointerEvent"): MSPointerEvent; createEvent(eventInterface: "MediaEncryptedEvent"): MediaEncryptedEvent; createEvent(eventInterface: "MediaKeyMessageEvent"): MediaKeyMessageEvent; createEvent(eventInterface: "MediaQueryListEvent"): MediaQueryListEvent; @@ -9879,43 +9871,6 @@ declare var MSGesture: { new(): MSGesture; }; -/** The MSGestureEvent is a proprietary interface specific to Internet Explorer and Microsoft Edge which represents events that occur due to touch gestures. Events using this interface include MSGestureStart, MSGestureEnd, MSGestureTap, MSGestureHold, MSGestureChange, and MSInertiaStart. */ -interface MSGestureEvent extends UIEvent { - readonly clientX: number; - readonly clientY: number; - readonly expansion: number; - readonly gestureObject: any; - readonly hwTimestamp: number; - readonly offsetX: number; - readonly offsetY: number; - readonly rotation: number; - readonly scale: number; - readonly screenX: number; - readonly screenY: number; - readonly translationX: number; - readonly translationY: number; - readonly velocityAngular: number; - readonly velocityExpansion: number; - readonly velocityX: number; - readonly velocityY: number; - initGestureEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, offsetXArg: number, offsetYArg: number, translationXArg: number, translationYArg: number, scaleArg: number, expansionArg: number, rotationArg: number, velocityXArg: number, velocityYArg: number, velocityExpansionArg: number, velocityAngularArg: number, hwTimestampArg: number): void; - readonly MSGESTURE_FLAG_BEGIN: number; - readonly MSGESTURE_FLAG_CANCEL: number; - readonly MSGESTURE_FLAG_END: number; - readonly MSGESTURE_FLAG_INERTIA: number; - readonly MSGESTURE_FLAG_NONE: number; -} - -declare var MSGestureEvent: { - prototype: MSGestureEvent; - new(): MSGestureEvent; - readonly MSGESTURE_FLAG_BEGIN: number; - readonly MSGESTURE_FLAG_CANCEL: number; - readonly MSGESTURE_FLAG_END: number; - readonly MSGESTURE_FLAG_INERTIA: number; - readonly MSGESTURE_FLAG_NONE: number; -}; - /** The msGraphicsTrust() constructor returns an object that provides properties for info on protected video playback. */ interface MSGraphicsTrust { readonly constrictionActive: boolean; @@ -9977,25 +9932,6 @@ declare var MSMediaKeyError: { readonly MS_MEDIA_KEYERR_UNKNOWN: number; }; -interface MSMediaKeyMessageEvent extends Event { - readonly destinationURL: string | null; - readonly message: Uint8Array; -} - -declare var MSMediaKeyMessageEvent: { - prototype: MSMediaKeyMessageEvent; - new(): MSMediaKeyMessageEvent; -}; - -interface MSMediaKeyNeededEvent extends Event { - readonly initData: Uint8Array | null; -} - -declare var MSMediaKeyNeededEvent: { - prototype: MSMediaKeyNeededEvent; - new(): MSMediaKeyNeededEvent; -}; - interface MSMediaKeySession extends EventTarget { readonly error: MSMediaKeyError | null; readonly keySystem: string; @@ -10030,29 +9966,6 @@ interface MSNavigatorDoNotTrack { storeWebWideTrackingException(args: StoreExceptionsInformation): void; } -interface MSPointerEvent extends MouseEvent { - readonly currentPoint: any; - readonly height: number; - readonly hwTimestamp: number; - readonly intermediatePoints: any; - readonly isPrimary: boolean; - readonly pointerId: number; - readonly pointerType: any; - readonly pressure: number; - readonly rotation: number; - readonly tiltX: number; - readonly tiltY: number; - readonly width: number; - getCurrentPoint(element: Element): void; - getIntermediatePoints(element: Element): void; - initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void; -} - -declare var MSPointerEvent: { - prototype: MSPointerEvent; - new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent; -}; - interface MSStream { readonly type: string; msClose(): void; @@ -18389,21 +18302,6 @@ interface WindowEventMap extends GlobalEventHandlersEventMap, WindowEventHandler "mouseover": MouseEvent; "mouseup": MouseEvent; "mousewheel": Event; - "MSGestureChange": Event; - "MSGestureDoubleTap": Event; - "MSGestureEnd": Event; - "MSGestureHold": Event; - "MSGestureStart": Event; - "MSGestureTap": Event; - "MSInertiaStart": Event; - "MSPointerCancel": Event; - "MSPointerDown": Event; - "MSPointerEnter": Event; - "MSPointerLeave": Event; - "MSPointerMove": Event; - "MSPointerOut": Event; - "MSPointerOver": Event; - "MSPointerUp": Event; "offline": Event; "online": Event; "orientationchange": Event; @@ -18471,21 +18369,6 @@ interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandler ondeviceorientation: ((this: Window, ev: DeviceOrientationEvent) => any) | null; ondeviceorientationabsolute: ((this: Window, ev: DeviceOrientationEvent) => any) | null; onmousewheel: ((this: Window, ev: Event) => any) | null; - onmsgesturechange: ((this: Window, ev: Event) => any) | null; - onmsgesturedoubletap: ((this: Window, ev: Event) => any) | null; - onmsgestureend: ((this: Window, ev: Event) => any) | null; - onmsgesturehold: ((this: Window, ev: Event) => any) | null; - onmsgesturestart: ((this: Window, ev: Event) => any) | null; - onmsgesturetap: ((this: Window, ev: Event) => any) | null; - onmsinertiastart: ((this: Window, ev: Event) => any) | null; - onmspointercancel: ((this: Window, ev: Event) => any) | null; - onmspointerdown: ((this: Window, ev: Event) => any) | null; - onmspointerenter: ((this: Window, ev: Event) => any) | null; - onmspointerleave: ((this: Window, ev: Event) => any) | null; - onmspointermove: ((this: Window, ev: Event) => any) | null; - onmspointerout: ((this: Window, ev: Event) => any) | null; - onmspointerover: ((this: Window, ev: Event) => any) | null; - onmspointerup: ((this: Window, ev: Event) => any) | null; /** @deprecated */ onorientationchange: ((this: Window, ev: Event) => any) | null; onreadystatechange: ((this: Window, ev: ProgressEvent) => any) | null; @@ -19508,21 +19391,6 @@ declare var ondevicemotion: ((this: Window, ev: DeviceMotionEvent) => any) | nul declare var ondeviceorientation: ((this: Window, ev: DeviceOrientationEvent) => any) | null; declare var ondeviceorientationabsolute: ((this: Window, ev: DeviceOrientationEvent) => any) | null; declare var onmousewheel: ((this: Window, ev: Event) => any) | null; -declare var onmsgesturechange: ((this: Window, ev: Event) => any) | null; -declare var onmsgesturedoubletap: ((this: Window, ev: Event) => any) | null; -declare var onmsgestureend: ((this: Window, ev: Event) => any) | null; -declare var onmsgesturehold: ((this: Window, ev: Event) => any) | null; -declare var onmsgesturestart: ((this: Window, ev: Event) => any) | null; -declare var onmsgesturetap: ((this: Window, ev: Event) => any) | null; -declare var onmsinertiastart: ((this: Window, ev: Event) => any) | null; -declare var onmspointercancel: ((this: Window, ev: Event) => any) | null; -declare var onmspointerdown: ((this: Window, ev: Event) => any) | null; -declare var onmspointerenter: ((this: Window, ev: Event) => any) | null; -declare var onmspointerleave: ((this: Window, ev: Event) => any) | null; -declare var onmspointermove: ((this: Window, ev: Event) => any) | null; -declare var onmspointerout: ((this: Window, ev: Event) => any) | null; -declare var onmspointerover: ((this: Window, ev: Event) => any) | null; -declare var onmspointerup: ((this: Window, ev: Event) => any) | null; /** @deprecated */ declare var onorientationchange: ((this: Window, ev: Event) => any) | null; declare var onreadystatechange: ((this: Window, ev: ProgressEvent) => any) | null; diff --git a/inputfiles/removedTypes.json b/inputfiles/removedTypes.json index 1053ac3f3..6cc94dd38 100644 --- a/inputfiles/removedTypes.json +++ b/inputfiles/removedTypes.json @@ -250,6 +250,10 @@ "MSCredentials": null, "MSDCCEvent": null, "MSDSHEvent": null, + "MSGestureEvent": null, + "MSMediaKeyMessageEvent": null, + "MSMediaKeyNeededEvent": null, + "MSPointerEvent": null, "MSStreamReader": null, "PasswordCredential": null, "Position": null, @@ -455,6 +459,21 @@ "crypto": null, "isSecureContext": null, "msCredentials": null, + "onmsgesturechange": null, + "onmsgesturedoubletap": null, + "onmsgestureend": null, + "onmsgesturehold": null, + "onmsgesturestart": null, + "onmsgesturetap": null, + "onmsinertiastart": null, + "onmspointercancel": null, + "onmspointerdown": null, + "onmspointerenter": null, + "onmspointerleave": null, + "onmspointermove": null, + "onmspointerout": null, + "onmspointerover": null, + "onmspointerup": null, "ontouchcancel": null, "ontouchend": null, "ontouchmove": null, From df5bc5c7ad25f2da084ded63271a0d32cee20a63 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sun, 25 Oct 2020 01:37:10 +0200 Subject: [PATCH 13/18] Remove HTMLBaseFontElement --- baselines/dom.generated.d.ts | 28 ---------------------------- inputfiles/comments.json | 12 ------------ inputfiles/removedTypes.json | 1 + 3 files changed, 1 insertion(+), 40 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index e01516018..243935cd4 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -3819,10 +3819,6 @@ declare var DOMImplementation: { new(): DOMImplementation; }; -interface DOML2DeprecatedColorProperty { - color: string; -} - interface DOMMatrix extends DOMMatrixReadOnly { a: number; b: number; @@ -6293,29 +6289,6 @@ declare var HTMLBaseElement: { new(): HTMLBaseElement; }; -/** Provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating elements. */ -interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty { - /** - * Sets or retrieves the current typeface family. - */ - /** @deprecated */ - face: string; - /** - * Sets or retrieves the font size of the object. - */ - /** @deprecated */ - size: number; - addEventListener(type: K, listener: (this: HTMLBaseFontElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLBaseFontElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; -} - -declare var HTMLBaseFontElement: { - prototype: HTMLBaseFontElement; - new(): HTMLBaseFontElement; -}; - interface HTMLBodyElementEventMap extends HTMLElementEventMap, WindowEventHandlersEventMap { "orientationchange": Event; } @@ -19171,7 +19144,6 @@ interface HTMLElementTagNameMap { "audio": HTMLAudioElement; "b": HTMLElement; "base": HTMLBaseElement; - "basefont": HTMLBaseFontElement; "bdi": HTMLElement; "bdo": HTMLElement; "blockquote": HTMLQuoteElement; diff --git a/inputfiles/comments.json b/inputfiles/comments.json index b048148ea..6fbe5b28d 100644 --- a/inputfiles/comments.json +++ b/inputfiles/comments.json @@ -1338,18 +1338,6 @@ } } }, - "HTMLBaseFontElement": { - "properties": { - "property": { - "face": { - "comment": "/**\n * Sets or retrieves the current typeface family.\n */" - }, - "size": { - "comment": "/**\n * Sets or retrieves the font size of the object.\n */" - } - } - } - }, "HTMLTextAreaElement": { "properties": { "property": { diff --git a/inputfiles/removedTypes.json b/inputfiles/removedTypes.json index 6cc94dd38..cecd235f9 100644 --- a/inputfiles/removedTypes.json +++ b/inputfiles/removedTypes.json @@ -199,6 +199,7 @@ "FederatedCredential": null, "FormDataEvent": null, "HTMLAreasCollection": null, + "HTMLBaseFontElement": null, "HTMLMediaElement": { "properties": { "property": { From ca5e57484fc9abddecef2a28ac8f371533a53dab Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sun, 25 Oct 2020 01:11:56 +0200 Subject: [PATCH 14/18] Remove ServiceWorkerMessageEvent --- baselines/dom.generated.d.ts | 24 ------------------------ inputfiles/removedTypes.json | 1 + 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 243935cd4..f01561406 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -1698,14 +1698,6 @@ interface SecurityPolicyViolationEventInit extends EventInit { violatedDirective?: string; } -interface ServiceWorkerMessageEventInit extends EventInit { - data?: any; - lastEventId?: string; - origin?: string; - ports?: MessagePort[] | null; - source?: ServiceWorker | MessagePort | null; -} - interface ShadowRootInit { delegatesFocus?: boolean; mode: ShadowRootMode; @@ -4698,7 +4690,6 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "SVGZoomEvent"): SVGZoomEvent; createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent; - createEvent(eventInterface: "ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent; createEvent(eventInterface: "SpeechRecognitionErrorEvent"): SpeechRecognitionErrorEvent; createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent; createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent; @@ -4944,7 +4935,6 @@ interface DocumentEvent { createEvent(eventInterface: "SVGZoomEvent"): SVGZoomEvent; createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent; - createEvent(eventInterface: "ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent; createEvent(eventInterface: "SpeechRecognitionErrorEvent"): SpeechRecognitionErrorEvent; createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent; createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent; @@ -14842,20 +14832,6 @@ declare var ServiceWorkerContainer: { new(): ServiceWorkerContainer; }; -/** This ServiceWorker API interface contains information about an event sent to a ServiceWorkerContainer target. This extends the default message event to allow setting a ServiceWorker object as the source of a message. The event object is accessed via the handler function of a message event, when fired by a message received from a service worker. */ -interface ServiceWorkerMessageEvent extends Event { - readonly data: any; - readonly lastEventId: string; - readonly origin: string; - readonly ports: ReadonlyArray | null; - readonly source: ServiceWorker | MessagePort | null; -} - -declare var ServiceWorkerMessageEvent: { - prototype: ServiceWorkerMessageEvent; - new(type: string, eventInitDict?: ServiceWorkerMessageEventInit): ServiceWorkerMessageEvent; -}; - interface ServiceWorkerRegistrationEventMap { "updatefound": Event; } diff --git a/inputfiles/removedTypes.json b/inputfiles/removedTypes.json index cecd235f9..f7271ab34 100644 --- a/inputfiles/removedTypes.json +++ b/inputfiles/removedTypes.json @@ -295,6 +295,7 @@ } } }, + "ServiceWorkerMessageEvent": null, "ShadowRoot": { "properties": { "property": { From 4ad886015d0f2af864cd5e677ace96d6c4d8138c Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sat, 24 Oct 2020 23:59:35 +0200 Subject: [PATCH 15/18] Remove DeviceLightEvent --- baselines/dom.generated.d.ts | 19 ------------------- inputfiles/removedTypes.json | 7 +++++++ 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index f01561406..346bb683c 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -358,10 +358,6 @@ interface DelayOptions extends AudioNodeOptions { maxDelayTime?: number; } -interface DeviceLightEventInit extends EventInit { - value?: number; -} - interface DeviceMotionEventAccelerationInit { x?: number | null; y?: number | null; @@ -4296,16 +4292,6 @@ declare var DeviceAcceleration: { new(): DeviceAcceleration; }; -/** The DeviceLightEvent provides web developers with information from photo sensors or similiar detectors about ambient light levels near the device. For example this may be useful to adjust the screen's brightness based on the current ambient light level in order to save energy or provide better readability. */ -interface DeviceLightEvent extends Event { - readonly value: number; -} - -declare var DeviceLightEvent: { - prototype: DeviceLightEvent; - new(typeArg: string, eventInitDict?: DeviceLightEventInit): DeviceLightEvent; -}; - /** The DeviceMotionEvent provides web developers with information about the speed of changes for the device's position and orientation. */ interface DeviceMotionEvent extends Event { readonly acceleration: DeviceMotionEventAcceleration | null; @@ -4640,7 +4626,6 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "CloseEvent"): CloseEvent; createEvent(eventInterface: "CompositionEvent"): CompositionEvent; createEvent(eventInterface: "CustomEvent"): CustomEvent; - createEvent(eventInterface: "DeviceLightEvent"): DeviceLightEvent; createEvent(eventInterface: "DeviceMotionEvent"): DeviceMotionEvent; createEvent(eventInterface: "DeviceOrientationEvent"): DeviceOrientationEvent; createEvent(eventInterface: "DragEvent"): DragEvent; @@ -4885,7 +4870,6 @@ interface DocumentEvent { createEvent(eventInterface: "CloseEvent"): CloseEvent; createEvent(eventInterface: "CompositionEvent"): CompositionEvent; createEvent(eventInterface: "CustomEvent"): CustomEvent; - createEvent(eventInterface: "DeviceLightEvent"): DeviceLightEvent; createEvent(eventInterface: "DeviceMotionEvent"): DeviceMotionEvent; createEvent(eventInterface: "DeviceOrientationEvent"): DeviceOrientationEvent; createEvent(eventInterface: "DragEvent"): DragEvent; @@ -18216,7 +18200,6 @@ interface WindowEventMap extends GlobalEventHandlersEventMap, WindowEventHandler "compassneedscalibration": Event; "contextmenu": MouseEvent; "dblclick": MouseEvent; - "devicelight": DeviceLightEvent; "devicemotion": DeviceMotionEvent; "deviceorientation": DeviceOrientationEvent; "deviceorientationabsolute": DeviceOrientationEvent; @@ -18313,7 +18296,6 @@ interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandler readonly navigator: Navigator; offscreenBuffering: string | boolean; oncompassneedscalibration: ((this: Window, ev: Event) => any) | null; - ondevicelight: ((this: Window, ev: DeviceLightEvent) => any) | null; ondevicemotion: ((this: Window, ev: DeviceMotionEvent) => any) | null; ondeviceorientation: ((this: Window, ev: DeviceOrientationEvent) => any) | null; ondeviceorientationabsolute: ((this: Window, ev: DeviceOrientationEvent) => any) | null; @@ -19334,7 +19316,6 @@ declare const name: void; declare var navigator: Navigator; declare var offscreenBuffering: string | boolean; declare var oncompassneedscalibration: ((this: Window, ev: Event) => any) | null; -declare var ondevicelight: ((this: Window, ev: DeviceLightEvent) => any) | null; declare var ondevicemotion: ((this: Window, ev: DeviceMotionEvent) => any) | null; declare var ondeviceorientation: ((this: Window, ev: DeviceOrientationEvent) => any) | null; declare var ondeviceorientationabsolute: ((this: Window, ev: DeviceOrientationEvent) => any) | null; diff --git a/inputfiles/removedTypes.json b/inputfiles/removedTypes.json index f7271ab34..302d8aacc 100644 --- a/inputfiles/removedTypes.json +++ b/inputfiles/removedTypes.json @@ -195,6 +195,7 @@ } } }, + "DeviceLightEvent": null, "ElementInternals": null, "FederatedCredential": null, "FormDataEvent": null, @@ -461,6 +462,7 @@ "crypto": null, "isSecureContext": null, "msCredentials": null, + "ondevicelight": null, "onmsgesturechange": null, "onmsgesturedoubletap": null, "onmsgestureend": null, @@ -492,6 +494,11 @@ "requestAnimationFrame": null } }, + "events": { + "event": [ + "devicelight" + ] + }, "implements": [ "GlobalFetch", "IDBEnvironment", From 3907a3e015e92595a07a213909cf25b054fb785c Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sat, 24 Oct 2020 23:06:45 +0200 Subject: [PATCH 16/18] Remove unimplemented Web Authentication APIs --- baselines/dom.generated.d.ts | 89 --------------------------- baselines/dom.iterable.generated.d.ts | 4 -- inputfiles/knownTypes.json | 1 - inputfiles/removedTypes.json | 4 ++ 4 files changed, 4 insertions(+), 94 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 346bb683c..59c895284 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -2,14 +2,6 @@ /// DOM APIs ///////////////////////////// -interface Account { - displayName: string; - id: string; - imageURL?: string; - name?: string; - rpDisplayName: string; -} - interface AddEventListenerOptions extends EventListenerOptions { once?: boolean; passive?: boolean; @@ -77,13 +69,6 @@ interface AnimationPlaybackEventInit extends EventInit { timelineTime?: number | null; } -interface AssertionOptions { - allowList?: ScopedCredentialDescriptor[]; - extensions?: WebAuthnExtensions; - rpId?: string; - timeoutSeconds?: number; -} - interface AssignedNodesOptions { flatten?: boolean; } @@ -202,15 +187,6 @@ interface ChannelSplitterOptions extends AudioNodeOptions { numberOfOutputs?: number; } -interface ClientData { - challenge: string; - extensions?: WebAuthnExtensions; - hashAlg: string | Algorithm; - origin: string; - rpId: string; - tokenBinding?: string; -} - interface ClientQueryOptions { includeUncontrolled?: boolean; type?: ClientTypes; @@ -1649,24 +1625,6 @@ interface SVGBoundingBoxOptions { stroke?: boolean; } -interface ScopedCredentialDescriptor { - id: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer | null; - transports?: Transport[]; - type: ScopedCredentialType; -} - -interface ScopedCredentialOptions { - excludeList?: ScopedCredentialDescriptor[]; - extensions?: WebAuthnExtensions; - rpId?: string; - timeoutSeconds?: number; -} - -interface ScopedCredentialParameters { - algorithm: string | Algorithm; - type: ScopedCredentialType; -} - interface ScrollIntoViewOptions extends ScrollOptions { block?: ScrollLogicalPosition; inline?: ScrollLogicalPosition; @@ -1872,9 +1830,6 @@ interface WaveShaperOptions extends AudioNodeOptions { oversample?: OverSampleType; } -interface WebAuthnExtensions { -} - interface WebGLContextAttributes { alpha?: boolean; antialias?: boolean; @@ -14631,26 +14586,6 @@ declare var SVGZoomEvent: { new(): SVGZoomEvent; }; -interface ScopedCredential { - readonly id: ArrayBuffer; - readonly type: ScopedCredentialType; -} - -declare var ScopedCredential: { - prototype: ScopedCredential; - new(): ScopedCredential; -}; - -interface ScopedCredentialInfo { - readonly credential: ScopedCredential; - readonly publicKey: CryptoKey; -} - -declare var ScopedCredentialInfo: { - prototype: ScopedCredentialInfo; - new(): ScopedCredentialInfo; -}; - /** A screen, usually the one on which the current window is being rendered, and is obtained using window.screen. */ interface Screen { readonly availHeight: number; @@ -16193,28 +16128,6 @@ declare var WaveShaperNode: { new(context: BaseAudioContext, options?: WaveShaperOptions): WaveShaperNode; }; -interface WebAuthentication { - getAssertion(assertionChallenge: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer | null, options?: AssertionOptions): Promise; - makeCredential(accountInformation: Account, cryptoParameters: ScopedCredentialParameters[], attestationChallenge: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer | null, options?: ScopedCredentialOptions): Promise; -} - -declare var WebAuthentication: { - prototype: WebAuthentication; - new(): WebAuthentication; -}; - -interface WebAuthnAssertion { - readonly authenticatorData: ArrayBuffer; - readonly clientData: ArrayBuffer; - readonly credential: ScopedCredential; - readonly signature: ArrayBuffer; -} - -declare var WebAuthnAssertion: { - prototype: WebAuthnAssertion; - new(): WebAuthnAssertion; -}; - interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase { } @@ -19874,7 +19787,6 @@ type RequestRedirect = "error" | "follow" | "manual"; type ResidentKeyRequirement = "discouraged" | "preferred" | "required"; type ResizeQuality = "high" | "low" | "medium" | "pixelated"; type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"; -type ScopedCredentialType = "ScopedCred"; type ScrollBehavior = "auto" | "smooth"; type ScrollLogicalPosition = "center" | "end" | "nearest" | "start"; type ScrollRestoration = "auto" | "manual"; @@ -19888,7 +19800,6 @@ type SpeechSynthesisErrorCode = "audio-busy" | "audio-hardware" | "canceled" | " type TextTrackKind = "captions" | "chapters" | "descriptions" | "metadata" | "subtitles"; type TextTrackMode = "disabled" | "hidden" | "showing"; type TouchType = "direct" | "stylus"; -type Transport = "ble" | "nfc" | "usb"; type UserVerificationRequirement = "discouraged" | "preferred" | "required"; type VRDisplayEventReason = "mounted" | "navigation" | "requested" | "unmounted"; type VideoFacingModeEnum = "environment" | "left" | "right" | "user"; diff --git a/baselines/dom.iterable.generated.d.ts b/baselines/dom.iterable.generated.d.ts index d7787b97d..78fc8a243 100644 --- a/baselines/dom.iterable.generated.d.ts +++ b/baselines/dom.iterable.generated.d.ts @@ -267,10 +267,6 @@ interface WEBGL_draw_buffers { drawBuffersWEBGL(buffers: Iterable): void; } -interface WebAuthentication { - makeCredential(accountInformation: Account, cryptoParameters: Iterable, attestationChallenge: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer | null, options?: ScopedCredentialOptions): Promise; -} - interface WebGL2RenderingContextBase { clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: GLuint): void; clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: GLuint): void; diff --git a/inputfiles/knownTypes.json b/inputfiles/knownTypes.json index dc8f40ad1..85de3a8a9 100644 --- a/inputfiles/knownTypes.json +++ b/inputfiles/knownTypes.json @@ -11,7 +11,6 @@ "BigInteger", "ByteLengthChunk", "CanvasRenderingContext2DSettings", - "ClientData", "ClientQueryOptions", "ClientTypes", "CompositeOperationOrAuto", diff --git a/inputfiles/removedTypes.json b/inputfiles/removedTypes.json index 302d8aacc..3d41a6521 100644 --- a/inputfiles/removedTypes.json +++ b/inputfiles/removedTypes.json @@ -289,6 +289,8 @@ } } }, + "ScopedCredential": null, + "ScopedCredentialInfo": null, "ServiceWorkerGlobalScope": { "properties": { "property": { @@ -411,6 +413,8 @@ } } }, + "WebAuthentication": null, + "WebAuthnAssertion": null, "WebGLBuffer": { "extends": null }, From f1d41bc24edc188cc5ecd75846d9e1fe2af6ddf6 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sat, 24 Oct 2020 23:38:09 +0200 Subject: [PATCH 17/18] Use BCD to autoremove unimplemented features --- baselines/dom.generated.d.ts | 104 -------- baselines/webworker.generated.d.ts | 51 ---- inputfiles/idl/Streams.widl | 2 +- inputfiles/overridingTypes.json | 26 -- inputfiles/removedTypes.json | 133 +--------- package.json | 1 + src/bcd.ts | 380 +++++++++++++++++++++++++++++ src/index.ts | 4 +- tsconfig.json | 3 +- 9 files changed, 389 insertions(+), 315 deletions(-) create mode 100644 src/bcd.ts diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 59c895284..a4fbfeb39 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -1785,14 +1785,6 @@ interface ULongRange { min?: number; } -interface UnderlyingByteSource { - autoAllocateChunkSize?: number; - cancel?: ReadableStreamErrorCallback; - pull?: ReadableByteStreamControllerCallback; - start?: ReadableByteStreamControllerCallback; - type: "bytes"; -} - interface UnderlyingSink { abort?: WritableStreamErrorCallback; close?: WritableStreamDefaultControllerCloseCallback; @@ -12317,24 +12309,10 @@ declare var Range: { toString(): string; }; -interface ReadableByteStreamController { - readonly byobRequest: ReadableStreamBYOBRequest | undefined; - readonly desiredSize: number | null; - close(): void; - enqueue(chunk: ArrayBufferView): void; - error(error?: any): void; -} - -declare var ReadableByteStreamController: { - prototype: ReadableByteStreamController; - new(): ReadableByteStreamController; -}; - /** This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object. */ interface ReadableStream { readonly locked: boolean; cancel(reason?: any): Promise; - getReader(options: { mode: "byob" }): ReadableStreamBYOBReader; getReader(): ReadableStreamDefaultReader; pipeThrough({ writable, readable }: { writable: WritableStream, readable: ReadableStream }, options?: PipeOptions): ReadableStream; pipeTo(dest: WritableStream, options?: PipeOptions): Promise; @@ -12343,33 +12321,9 @@ interface ReadableStream { declare var ReadableStream: { prototype: ReadableStream; - new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number, size?: undefined }): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; }; -interface ReadableStreamBYOBReader { - readonly closed: Promise; - cancel(reason?: any): Promise; - read(view: T): Promise>; - releaseLock(): void; -} - -declare var ReadableStreamBYOBReader: { - prototype: ReadableStreamBYOBReader; - new(): ReadableStreamBYOBReader; -}; - -interface ReadableStreamBYOBRequest { - readonly view: ArrayBufferView; - respond(bytesWritten: number): void; - respondWithNewView(view: ArrayBufferView): void; -} - -declare var ReadableStreamBYOBRequest: { - prototype: ReadableStreamBYOBRequest; - new(): ReadableStreamBYOBRequest; -}; - interface ReadableStreamDefaultController { readonly desiredSize: number | null; close(): void; @@ -13710,46 +13664,6 @@ declare var SVGNumberList: { interface SVGPathElement extends SVGGraphicsElement { /** @deprecated */ readonly pathSegList: SVGPathSegList; - /** @deprecated */ - createSVGPathSegArcAbs(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcAbs; - /** @deprecated */ - createSVGPathSegArcRel(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcRel; - /** @deprecated */ - createSVGPathSegClosePath(): SVGPathSegClosePath; - /** @deprecated */ - createSVGPathSegCurvetoCubicAbs(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicAbs; - /** @deprecated */ - createSVGPathSegCurvetoCubicRel(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicRel; - /** @deprecated */ - createSVGPathSegCurvetoCubicSmoothAbs(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothAbs; - /** @deprecated */ - createSVGPathSegCurvetoCubicSmoothRel(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothRel; - /** @deprecated */ - createSVGPathSegCurvetoQuadraticAbs(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticAbs; - /** @deprecated */ - createSVGPathSegCurvetoQuadraticRel(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticRel; - /** @deprecated */ - createSVGPathSegCurvetoQuadraticSmoothAbs(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothAbs; - /** @deprecated */ - createSVGPathSegCurvetoQuadraticSmoothRel(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothRel; - /** @deprecated */ - createSVGPathSegLinetoAbs(x: number, y: number): SVGPathSegLinetoAbs; - /** @deprecated */ - createSVGPathSegLinetoHorizontalAbs(x: number): SVGPathSegLinetoHorizontalAbs; - /** @deprecated */ - createSVGPathSegLinetoHorizontalRel(x: number): SVGPathSegLinetoHorizontalRel; - /** @deprecated */ - createSVGPathSegLinetoRel(x: number, y: number): SVGPathSegLinetoRel; - /** @deprecated */ - createSVGPathSegLinetoVerticalAbs(y: number): SVGPathSegLinetoVerticalAbs; - /** @deprecated */ - createSVGPathSegLinetoVerticalRel(y: number): SVGPathSegLinetoVerticalRel; - /** @deprecated */ - createSVGPathSegMovetoAbs(x: number, y: number): SVGPathSegMovetoAbs; - /** @deprecated */ - createSVGPathSegMovetoRel(x: number, y: number): SVGPathSegMovetoRel; - /** @deprecated */ - getPathSegAtLength(distance: number): number; getPointAtLength(distance: number): SVGPoint; getTotalLength(): number; addEventListener(type: K, listener: (this: SVGPathElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -14187,25 +14101,11 @@ interface SVGSVGElementEventMap extends SVGElementEventMap { /** Provides access to the properties of elements, as well as methods to manipulate them. This interface contains also various miscellaneous commonly-used utility methods, such as matrix operations and the ability to control the time of redraw on visual rendering devices. */ interface SVGSVGElement extends SVGGraphicsElement, DocumentEvent, SVGFitToViewBox, SVGZoomAndPan { - /** @deprecated */ - contentScriptType: string; - /** @deprecated */ - contentStyleType: string; currentScale: number; readonly currentTranslate: SVGPoint; readonly height: SVGAnimatedLength; onunload: ((this: SVGSVGElement, ev: Event) => any) | null; onzoom: ((this: SVGSVGElement, ev: SVGZoomEvent) => any) | null; - /** @deprecated */ - readonly pixelUnitToMillimeterX: number; - /** @deprecated */ - readonly pixelUnitToMillimeterY: number; - /** @deprecated */ - readonly screenPixelToMillimeterX: number; - /** @deprecated */ - readonly screenPixelToMillimeterY: number; - /** @deprecated */ - readonly viewport: SVGRect; readonly width: SVGAnimatedLength; readonly x: SVGAnimatedLength; readonly y: SVGAnimatedLength; @@ -18964,10 +18864,6 @@ interface RTCStatsCallback { (report: RTCStatsReport): void; } -interface ReadableByteStreamControllerCallback { - (controller: ReadableByteStreamController): void | PromiseLike; -} - interface ReadableStreamDefaultControllerCallback { (controller: ReadableStreamDefaultController): void | PromiseLike; } diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index 50b07cb63..663250113 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -517,14 +517,6 @@ interface Transformer { writableType?: undefined; } -interface UnderlyingByteSource { - autoAllocateChunkSize?: number; - cancel?: ReadableStreamErrorCallback; - pull?: ReadableByteStreamControllerCallback; - start?: ReadableByteStreamControllerCallback; - type: "bytes"; -} - interface UnderlyingSink { abort?: WritableStreamErrorCallback; close?: WritableStreamDefaultControllerCloseCallback; @@ -1513,7 +1505,6 @@ declare var ExtendableMessageEvent: { interface FetchEvent extends ExtendableEvent { readonly clientId: string; readonly preloadResponse: Promise; - readonly replacesClientId: string; readonly request: Request; readonly resultingClientId: string; respondWith(r: Response | Promise): void; @@ -2692,24 +2683,10 @@ declare var PushSubscriptionOptions: { new(): PushSubscriptionOptions; }; -interface ReadableByteStreamController { - readonly byobRequest: ReadableStreamBYOBRequest | undefined; - readonly desiredSize: number | null; - close(): void; - enqueue(chunk: ArrayBufferView): void; - error(error?: any): void; -} - -declare var ReadableByteStreamController: { - prototype: ReadableByteStreamController; - new(): ReadableByteStreamController; -}; - /** This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object. */ interface ReadableStream { readonly locked: boolean; cancel(reason?: any): Promise; - getReader(options: { mode: "byob" }): ReadableStreamBYOBReader; getReader(): ReadableStreamDefaultReader; pipeThrough({ writable, readable }: { writable: WritableStream, readable: ReadableStream }, options?: PipeOptions): ReadableStream; pipeTo(dest: WritableStream, options?: PipeOptions): Promise; @@ -2718,33 +2695,9 @@ interface ReadableStream { declare var ReadableStream: { prototype: ReadableStream; - new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number, size?: undefined }): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; }; -interface ReadableStreamBYOBReader { - readonly closed: Promise; - cancel(reason?: any): Promise; - read(view: T): Promise>; - releaseLock(): void; -} - -declare var ReadableStreamBYOBReader: { - prototype: ReadableStreamBYOBReader; - new(): ReadableStreamBYOBReader; -}; - -interface ReadableStreamBYOBRequest { - readonly view: ArrayBufferView; - respond(bytesWritten: number): void; - respondWithNewView(view: ArrayBufferView): void; -} - -declare var ReadableStreamBYOBRequest: { - prototype: ReadableStreamBYOBRequest; - new(): ReadableStreamBYOBRequest; -}; - interface ReadableStreamDefaultController { readonly desiredSize: number | null; close(): void; @@ -5805,10 +5758,6 @@ interface QueuingStrategySizeCallback { (chunk: T): number; } -interface ReadableByteStreamControllerCallback { - (controller: ReadableByteStreamController): void | PromiseLike; -} - interface ReadableStreamDefaultControllerCallback { (controller: ReadableStreamDefaultController): void | PromiseLike; } diff --git a/inputfiles/idl/Streams.widl b/inputfiles/idl/Streams.widl index 040d5d503..b774f893c 100644 --- a/inputfiles/idl/Streams.widl +++ b/inputfiles/idl/Streams.widl @@ -1,5 +1,5 @@ [Constructor(optional UnderlyingSource underlyingSource, optional QueuingStrategy strategy), - Constructor(optional UnderlyingByteSource underlyingSource, optional QueuingStrategy strategy), +// Constructor(optional UnderlyingByteSource underlyingSource, optional QueuingStrategy strategy), Exposed=(Window,Worker)] interface ReadableStream { readonly attribute boolean locked; diff --git a/inputfiles/overridingTypes.json b/inputfiles/overridingTypes.json index e35b7f8b9..5f7ea4de5 100644 --- a/inputfiles/overridingTypes.json +++ b/inputfiles/overridingTypes.json @@ -1888,10 +1888,6 @@ "name": "push", "type": "PushEvent" }, - { - "name": "pushsubscriptionchange", - "type": "PushSubscriptionChangeEvent" - }, { "name": "sync", "type": "SyncEvent" @@ -2212,7 +2208,6 @@ ], "constructor": { "override-signatures": [ - "new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number, size?: undefined }): ReadableStream", "new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream" ] }, @@ -2220,7 +2215,6 @@ "method": { "getReader": { "override-signatures": [ - "getReader(options: { mode: \"byob\" }): ReadableStreamBYOBReader", "getReader(): ReadableStreamDefaultReader" ] }, @@ -2260,17 +2254,6 @@ } } }, - "ReadableStreamBYOBReader": { - "methods": { - "method": { - "read": { - "override-signatures": [ - "read(view: T): Promise>" - ] - } - } - } - }, "ReadableStreamDefaultReader": { "type-parameters": [ { @@ -2288,15 +2271,6 @@ } } }, - "ReadableByteStreamController": { - "properties": { - "property": { - "byobRequest": { - "override-type": "ReadableStreamBYOBRequest | undefined" - } - } - } - }, "ReadableStreamDefaultController": { "type-parameters": [ { diff --git a/inputfiles/removedTypes.json b/inputfiles/removedTypes.json index 3d41a6521..bdb53afbe 100644 --- a/inputfiles/removedTypes.json +++ b/inputfiles/removedTypes.json @@ -34,19 +34,7 @@ } } }, - "XMLHttpRequestEventTarget": null, - "WorkerUtils": { - "methods": { - "method": { - "clearImmediate": null, - "clearInterval": null, - "clearTimeout": null, - "setImmediate": null, - "setInterval": null, - "setTimeout": null - } - } - } + "XMLHttpRequestEventTarget": null } }, "callback-interfaces": { @@ -64,14 +52,12 @@ }, "interfaces": { "interface": { - "AudioTrackList": null, "AuthenticatorAttestationResponse": { "methods": { "method": { "getAuthenticatorData": null, "getPublicKey": null, - "getPublicKeyAlgorithm": null, - "getTransports": null + "getPublicKeyAlgorithm": null } } }, @@ -195,19 +181,11 @@ } } }, - "DeviceLightEvent": null, "ElementInternals": null, "FederatedCredential": null, "FormDataEvent": null, "HTMLAreasCollection": null, - "HTMLBaseFontElement": null, "HTMLMediaElement": { - "properties": { - "property": { - "audioTracks": null, - "videoTracks": null - } - }, "methods": { "method": { "getStartDate": null @@ -234,14 +212,6 @@ } } }, - "MediaStreamTrack": { - "properties": { - "property": { - "isolated": null, - "onisolationchange": null - } - } - }, "MessageEvent": { "methods": { "method": { @@ -252,7 +222,6 @@ "MSCredentials": null, "MSDCCEvent": null, "MSDSHEvent": null, - "MSGestureEvent": null, "MSMediaKeyMessageEvent": null, "MSMediaKeyNeededEvent": null, "MSPointerEvent": null, @@ -260,37 +229,6 @@ "PasswordCredential": null, "Position": null, "PositionError": null, - "PushSubscriptionChangeEvent": null, - "RTCDataChannel": { - "properties": { - "property": { - "onclosing": null - } - } - }, - "RTCIceCandidate": { - "properties": { - "property": { - "address": null - } - } - }, - "RTCIceTransport": { - "properties": { - "property": { - "component": null - } - } - }, - "RTCPeerConnectionIceEvent": { - "properties": { - "property": { - "url": null - } - } - }, - "ScopedCredential": null, - "ScopedCredentialInfo": null, "ServiceWorkerGlobalScope": { "properties": { "property": { @@ -298,7 +236,6 @@ } } }, - "ServiceWorkerMessageEvent": null, "ShadowRoot": { "properties": { "property": { @@ -306,15 +243,6 @@ } } }, - "SourceBuffer": { - "properties": { - "property": { - "audioTracks": null, - "textTracks": null, - "videoTracks": null - } - } - }, "StorageEvent": { "methods": { "method": { @@ -376,44 +304,6 @@ } } }, - "SVGUseElement": { - "properties": { - "property": { - "animatedInstanceRoot": null, - "instanceRoot": null - } - } - }, - "SVGZoomAndPan": null, - "TextMetrics": { - "properties": { - "property": { - "alphabeticBaseline": null, - "emHeightAscent": null, - "emHeightDescent": null, - "fontBoundingBoxAscent": null, - "fontBoundingBoxDescent": null, - "hangingBaseline": null, - "ideographicBaseline": null - } - } - }, - "TextTrack": { - "properties": { - "property": { - "sourceBuffer": null - } - } - }, - "VideoTrackList": null, - "VRPose": { - "properties": { - "property": { - "timestamp": null - } - } - }, - "WebAuthentication": null, "WebAuthnAssertion": null, "WebGLBuffer": { "extends": null @@ -421,7 +311,6 @@ "WebGLFramebuffer": { "extends": null }, - "WebGLObject": null, "WebGLProgram": { "extends": null }, @@ -466,7 +355,6 @@ "crypto": null, "isSecureContext": null, "msCredentials": null, - "ondevicelight": null, "onmsgesturechange": null, "onmsgesturedoubletap": null, "onmsgestureend": null, @@ -486,9 +374,6 @@ "ontouchend": null, "ontouchmove": null, "ontouchstart": null, - "onvrdisplayfocus": null, - "onvrdisplaypointerrestricted": null, - "onvrdisplaypointerunrestricted": null, "performance": null } }, @@ -511,20 +396,6 @@ "WindowConsole" ] }, - "WindowClient": { - "properties": { - "property": { - "ancestorOrigins": null - } - } - }, - "WorkerNavigator": { - "properties": { - "property": { - "serviceWorker": null - } - } - }, "XPathNSResolver": null } }, diff --git a/package.json b/package.json index e23118bd8..ca80a18c5 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "test": "tsc -p ./tsconfig.json && node ./lib/index.js && node ./lib/test.js" }, "dependencies": { + "@mdn/browser-compat-data": "2.0.3", "@types/jsdom": "^16.2.4", "@types/node": "^14.6.4", "@types/node-fetch": "^2.5.7", diff --git a/src/bcd.ts b/src/bcd.ts new file mode 100644 index 000000000..d5cb332da --- /dev/null +++ b/src/bcd.ts @@ -0,0 +1,380 @@ +import * as Browser from "./types"; +import bcd from "@mdn/browser-compat-data"; +import { Identifier, SimpleSupportStatement, SupportBlock } from "@mdn/browser-compat-data/types"; + +const forceKeepAlive: Record = { + // Things that are incorrectly reported as unsupported. + // These should be filed to https://github.com/mdn/browser-compat-data/issues + "Animation": ["finished", "pending", "ready", "updatePlaybackRate"], + "AnimationPlaybackEvent": ["currentTime", "timelineTime"], + "ByteLengthQueuingStrategy": ["size"], + "ConstantSourceNode": ["offset"], + "CountQueuingStrategy": ["size"], + "CSSSupportsRule": [], + "ExtendableMessageEvent": ["lastEventId", "origin", "ports", "source"], + "GlobalEventHandlers": [ + "onabort", + "oncancel", // Blink only as of Sep 2020 + "ontouchcancel", + "ontouchend", + "ontouchmove", + "ontouchstart" + ], + "HTMLIFrameElement": ["allowPaymentRequest"], + "KeyframeEffect": [ + "composite", + "iterationComposite", // Gecko only as of Sep 2020 + "getKeyframes", + "setKeyframes", + ], + "MediaSource": ["clearLiveSeekableRange", "setLiveSeekableRange"], + "NavigatorPlugins": ["javaEnabled", "mimeTypes", "plugins"], + "RTCDataChannel": ["id", "onerror"], + "SharedWorkerGlobalScope": ["close"], + "ServiceWorkerGlobalScope": ["onmessageerror"], + "SVGSVGElement": ["getCurrentTime", "pauseAnimations", "setCurrentTime", "unpauseAnimations"], + "TextTrackCue": ["endTime", "id", "pauseOnExit", "startTime", "track"], + "TrackEvent": ["track"], + "WebKitCSSMatrix": [], + "WindowEventHandlers": ["onmessage"], + + // Widely supported but without being correctly exposed to global + "DeviceMotionEventAcceleration": ["x", "y", "z"], + "DeviceMotionEventRotationRate": ["alpha", "beta", "gamma"], + "ReadableStreamDefaultReader": ["closed", "cancel", "read", "releaseLock"], + "ReadableStreamDefaultController": ["desiredSize", "close", "enqueue", "error"], + + // Things that indeed are not widely supported enough + // but they already have been in lib.d.ts for a while + "AbstractRange": ["collapsed", "endContainer", "endOffset", "startContainer", "startOffset"], + "AudioContext": ["outputLatency", "createMediaStreamTrackSource"], + "AudioListener": [ + "forwardX", + "forwardY", + "forwardZ", + "positionX", + "positionY", + "positionZ", + "upX", + "upY", + "upZ", + ], + "AudioParam": ["automationRate", "cancelAndHoldAtTime"], + "CaretPosition": [], + "ClipboardItem": [], + "DOMError": ["name"], + "FederatedCredential": [], + "FetchEvent": ["preloadResponse"], + "Gamepad": [ + "hand", + "pose", + "hapticActuators", // widely supported + ], + "GamepadHapticActuator": [ + "type", // widely supported + "pulse", + ], + "GamepadPose": [ + "angularAcceleration", + "angularVelocity", + "hasOrientation", + "hasPosition", + "linearAcceleration", + "linearVelocity", + "orientation", + "position", + ], + "HTMLElement": ["autocapitalize"], + "HTMLCanvasElement": ["transferControlToOffscreen"], + "HTMLDialogElement": ["open", "returnValue", "close", "show", "showModal"], + "InputDeviceInfo": ["getCapabilities"], + "Request": ["keepalive"], + "RTCCertificate": ["getFingerprints"], + "RTCDTMFSender": ["canInsertDTMF"], + "RTCDtlsTransport": [ + "getRemoteCertificates", + "iceTransport", + "onerror", + "onstatechange", + "state", + ], + "RTCError": [], + "RTCErrorEvent": ["error"], + "RTCIceCandidate": [ + "component", + "foundation", + "port", + "priority", + "protocol", + "relatedAddress", + "relatedPort", + "tcpType", + "type", + ], + "RTCIceTransport": [ + "gatheringState", + "getLocalCandidates", + "getLocalParameters", + "getRemoteCandidates", + "getRemoteParameters", + "getSelectedCandidatePair", + "ongatheringstatechange", + "onselectedcandidatepairchange", + "onstatechange", + "role", + "state", + ], + "RTCIdentityAssertion": ["idp", "name"], + "RTCPeerConnection": [ + "canTrickleIceCandidates", // widely supported + "getIdentityAssertion", + "onicecandidateerror", + "peerIdentity", + "setIdentityProvider", + "sctp", + ], + "RTCPeerConnectionIceErrorEvent": ["errorCode", "errorText", "hostCandidate", "url"], + "RTCRtpSender": ["getCapabilities", "rtcpTransport", "transport"], + "RTCRtpTransceiver": ["setCodecPreferences"], + "RTCSctpTransport": [ + "maxChannels", + "maxMessageSize", + "onstatechange", + "state", + "transport", + ], + "RTCStatsReport": [], + "MediaStreamTrackAudioSourceNode": [], + "NavigationPreloadManager": ["disable", "enable", "getState", "setHeaderValue"], + "Notification": [ + "actions", + "badge", + "image", + "maxActions", + "renotify", + "requireInteraction", + "silent", + "timestamp", + "vibrate", + ], + "OfflineAudioContext": [ + "resume", // widely supported + "suspend", + ], + "OffscreenCanvas": [ + "convertToBlob", + "getContext", + "height", + "transferToImageBitmap", + "width", + ], + "PasswordCredential": [], + "PushSubscription": ["expirationTime"], + "PushSubscriptionOptions" : ["userVisibleOnly"], + "ServiceWorkerRegistration": ["sync"], + "SpeechGrammar": ["src", "weight"], + "SpeechGrammarList": ["addFromString", "addFromURI", "item", "length"], + "SpeechRecognition": [ + "abort", + "continuous", + "grammars", + "interimResults", + "lang", + "maxAlternatives", + "onaudioend", + "onaudiostart", + "onend", + "onerror", + "onnomatch", + "onresult", + "onsoundend", + "onsoundstart", + "onspeechend", + "onspeechstart", + "onstart", + "start", + "stop", + ], + "SpeechRecognitionAlternative": ["confidence", "transcript"], + "SpeechRecognitionErrorEvent": ["error", "message"], + "SpeechRecognitionEvent": ["resultIndex", "results"], + "SpeechRecognitionResult": ["item", "length", "isFinal"], + "SpeechRecognitionResultList": ["item", "length"], + "SyncManager": ["getTags", "register"], + "SyncEvent": ["lastChance", "tag"], + "TextDecoderStream": [], + "TextEncoderStream": [], + "TransformStream": ["readable", "writable"], + "TransformStreamDefaultController": ["desiredSize", "enqueue", "error", "terminate"], + "VRDisplay": [ + "cancelAnimationFrame", + "capabilities", + "depthFar", + "depthNear", + "displayId", + "displayName", + "exitPresent", + "getEyeParameters", + "getFrameData", + "getLayers", + "getPose", + "isConnected", + "isPresenting", + "requestAnimationFrame", + "requestPresent", + "resetPose", + "stageParameters", + "submitFrame", + ], + "VRDisplayCapabilities": [ + "canPresent", + "hasExternalDisplay", + "hasOrientation", + "hasPosition", + "maxLayers", + ], + "VRDisplayEvent": ["display", "reason"], + "VREyeParameters": [ + "fieldOfView", + "offset", + "renderHeight", + "renderWidth", + ], + "VRFieldOfView": ["downDegrees", "leftDegrees", "rightDegrees", "upDegrees"], + "VRFrameData": [ + "leftProjectionMatrix", + "leftViewMatrix", + "pose", + "rightProjectionMatrix", + "rightViewMatrix", + "timestamp", + ], + "VRPose": [ + "angularAcceleration", + "angularVelocity", + "linearAcceleration", + "linearVelocity", + "orientation", + "position", + ], + "VTTCue": ["lineAlign", "positionAlign", "region"], + "WebGLVertexArrayObjectOES": [], + "Window": [ + "ondeviceorientationabsolute", + "onvrdisplayactivate", + "onvrdisplayblur", + "onvrdisplaydeactivate", + "onvrdisplaypresentchange" + ], + "WorkerNavigator": ["permissions"], + "WritableStream": ["abort", "getWriter", "locked"], + "WritableStreamDefaultController": ["error"], + "WritableStreamDefaultWriter": [ + "abort", + "close", + "closed", + "desiredSize", + "ready", + "releaseLock", + "write", + ], +}; + +function hasMultipleImplementations(support: SupportBlock) { + function hasStableImplementation(browser: SimpleSupportStatement | SimpleSupportStatement[] | undefined) { + if (!browser) { + return false; + } + const latest = Array.isArray(browser) ? browser[0] : browser; + return latest.version_added && !latest.version_removed && !latest.flags; + } + let count = 0; + if (hasStableImplementation(support.chrome) || hasStableImplementation(support.chrome_android)) { + count += 1; + } + if (hasStableImplementation(support.firefox) || hasStableImplementation(support.firefox_android)) { + count += 1; + } + if (hasStableImplementation(support.safari) || hasStableImplementation(support.safari_ios)) { + count += 1; + } + return count >= 2; +} + +function isEmpty(o: object) { + return !Object.keys(o).length; +} + +function isSuitable(key: string, value: Identifier, parentKey?: string) { + const forceAlive = parentKey ? forceKeepAlive[parentKey]?.includes(key) : !!forceKeepAlive[key]; + if (value.__compat && hasMultipleImplementations(value.__compat.support)) { + if (forceAlive) { + if (parentKey) { + console.warn(`Redundant forceKeepAlive item: ${parentKey}#${key}`) + } else if (!forceKeepAlive[key].length) { + console.warn(`Redundant forceKeepAlive item: ${key}`) + } + } + return true; + } + return forceAlive; +} + +export function getRemovalDataFromBcd(webidl: Browser.WebIdl) { + function getDefinition(key: string) { + if (webidl.interfaces!.interface.hasOwnProperty(key)) { + return { + type: "interface", + base: webidl.interfaces!.interface[key] + }; + } else if (webidl.mixins!.mixin.hasOwnProperty(key)) { + return { + type: "mixin", + base: webidl.mixins!.mixin[key] + }; + } + } + + const interfaces: Record = {}; + const mixins: Record = {}; + for (const [key, value] of Object.entries(bcd.api)) { + const definition = getDefinition(key); + if (!definition) { + continue; + } + const { base } = definition + if (!isSuitable(key, value)) { + if (definition.type === "interface") { + interfaces[key] = { exposed: "" }; + } + continue; + } + + const methods: Record = {}; + const properties: Record = {}; + for (const [memberKey, memberValue] of Object.entries(value)) { + if (!isSuitable(memberKey, memberValue, key)) { + if (base.methods.method.hasOwnProperty(memberKey)) { + methods[memberKey] = { exposed: "" }; + } else if (base.properties!.property.hasOwnProperty(memberKey)) { + properties[memberKey] = { exposed: "" }; + } + } + } + const removalItem: Record = {}; + if (!isEmpty(methods)) { + removalItem.methods = { method: methods }; + } + if (!isEmpty(properties)) { + removalItem.properties = { property: properties }; + } + if (!isEmpty(removalItem)) { + if (definition.type === "interface") { + interfaces[key] = removalItem; + } else { + mixins[key] = removalItem; + } + } + } + return { interfaces: { interface: interfaces }, mixins: { mixin: mixins } }; +} diff --git a/src/index.ts b/src/index.ts index 3e8ff8984..b0c07ae55 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,6 +5,7 @@ import { merge, resolveExposure, markAsDeprecated, mapToArray, arrayToMap } from import { Flavor, emitWebIdl } from "./emitter"; import { convert } from "./widlprocess"; import { getExposedTypes } from "./expose"; +import { getRemovalDataFromBcd } from "./bcd"; function mergeNamesakes(filtered: Browser.WebIdl) { const targets = [ @@ -173,6 +174,7 @@ function emitDom() { } } + webidl = merge(webidl, getRemovalDataFromBcd(webidl) as any); webidl = prune(webidl, removedItems); webidl = mergeApiDescriptions(webidl, documentationFromMDN); webidl = merge(webidl, addedItems); @@ -195,7 +197,7 @@ function emitDom() { if (!template) return obj; const filtered = { ...obj }; for (const k in template) { - if (!obj[k]) { + if (!obj[k] || obj[k].exposed === "") { console.warn(`removedTypes.json has a redundant field ${k} in ${JSON.stringify(template)}`); } else if (Array.isArray(template[k])) { if (!Array.isArray(obj[k])) { diff --git a/tsconfig.json b/tsconfig.json index 1d92daf0d..4c79bf29e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,8 @@ "esModuleInterop": true, "sourceMap": true, "noUnusedLocals": true, - "noUnusedParameters": true + "noUnusedParameters": true, + "resolveJsonModule": true }, "include": [ "./src" From fc218061a9f043f9b64673d96ba15661a2b8f608 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Tue, 11 Jun 2019 00:52:58 +0900 Subject: [PATCH 18/18] Remove dependency for browser.webidl.preprocessed.json --- baselines/dom.generated.d.ts | 2287 +- baselines/dom.iterable.generated.d.ts | 18 +- baselines/webworker.generated.d.ts | 295 +- baselines/webworker.iterable.generated.d.ts | 7 + inputfiles/addedTypes.json | 8 - inputfiles/browser.webidl.preprocessed.json | 94974 +--------------- inputfiles/comments.json | 21 - inputfiles/idl/CSS Inline Layout.widl | 4 +- inputfiles/idl/CSS Object Model.widl | 14 +- inputfiles/idl/CSSOM View.widl | 38 +- inputfiles/idl/Clipboard.widl | 4 +- inputfiles/idl/Console.widl | 38 +- inputfiles/idl/Content Security Policy.widl | 35 + inputfiles/idl/DOM.widl | 90 +- inputfiles/idl/Encoding.commentmap.json | 8 +- inputfiles/idl/Encoding.widl | 5 - inputfiles/idl/Fetch.widl | 13 +- inputfiles/idl/File.widl | 12 +- inputfiles/idl/Fullscreen.widl | 4 +- inputfiles/idl/Geolocation.widl | 12 +- .../HTML - Browsing the Web.commentmap.json | 2 +- inputfiles/idl/HTML - Canvas.commentmap.json | 9 +- inputfiles/idl/HTML - Canvas.widl | 94 +- .../idl/HTML - Common DOM interfaces.widl | 6 +- inputfiles/idl/HTML - Communication.widl | 2 +- .../HTML - Custom elements.commentmap.json | 4 +- inputfiles/idl/HTML - Custom elements.widl | 25 +- inputfiles/idl/HTML - DOM.commentmap.json | 2 +- inputfiles/idl/HTML - DOM.widl | 16 +- inputfiles/idl/HTML - Drag and drop.widl | 19 +- inputfiles/idl/HTML - Embedded content.widl | 2 +- ...orm control infrastructure.commentmap.json | 4 +- .../HTML - Form control infrastructure.widl | 16 +- .../idl/HTML - Form elements.commentmap.json | 36 +- inputfiles/idl/HTML - Form elements.widl | 26 +- inputfiles/idl/HTML - Forms.commentmap.json | 12 +- inputfiles/idl/HTML - Forms.widl | 6 +- inputfiles/idl/HTML - Grouping content.widl | 18 + .../idl/HTML - Image maps.commentmap.json | 2 +- inputfiles/idl/HTML - Image maps.widl | 2 + .../HTML - ImageBitmap and animations.widl | 6 +- ...TML - Interactive elements.commentmap.json | 4 +- .../idl/HTML - Interactive elements.widl | 6 +- inputfiles/idl/HTML - Links.commentmap.json | 22 +- inputfiles/idl/HTML - Media.commentmap.json | 29 +- inputfiles/idl/HTML - Media.widl | 13 +- inputfiles/idl/HTML - Obsolete features.widl | 18 +- ...- Offline Web applications.commentmap.json | 8 +- .../idl/HTML - Offline Web applications.widl | 6 +- .../idl/HTML - Scripting.commentmap.json | 4 +- inputfiles/idl/HTML - Scripting.widl | 1 + inputfiles/idl/HTML - Sections.widl | 4 + .../idl/HTML - Semantics.commentmap.json | 2 +- inputfiles/idl/HTML - Semantics.widl | 9 + inputfiles/idl/HTML - Server-sent events.widl | 2 +- ...HTML - Session history and navigation.widl | 16 +- .../HTML - System state and capabilities.widl | 6 +- ...em states and capabilities.commentmap.json | 12 + ...HTML - System states and capabilities.widl | 84 + .../idl/HTML - Tabular data.commentmap.json | 8 +- inputfiles/idl/HTML - Tabular data.widl | 24 +- ...TML - Text level semantics.commentmap.json | 2 +- .../idl/HTML - Text level semantics.widl | 4 + .../HTML - The Window object.commentmap.json | 19 + inputfiles/idl/HTML - The Window object.widl | 66 + ...he iframe, embed, and object elements.widl | 12 +- .../HTML - The input element.commentmap.json | 12 +- inputfiles/idl/HTML - The input element.widl | 14 +- .../HTML - User interaction.commentmap.json | 4 +- ...TML - Web application APIs.commentmap.json | 2 + .../idl/HTML - Web application APIs.widl | 25 +- ...n => HTML - Web messaging.commentmap.json} | 0 ...ssaging.widl => HTML - Web messaging.widl} | 16 +- inputfiles/idl/HTML - Web sockets.widl | 10 +- .../idl/HTML - Web storage.commentmap.json | 16 +- inputfiles/idl/HTML - Web storage.widl | 8 +- .../idl/HTML - Web workers.commentmap.json | 2 +- inputfiles/idl/HTML - Web workers.widl | 20 +- .../idl/HTML - Worklets.commentmap.json | 3 + inputfiles/idl/HTML - Worklets.widl | 11 + ...entifiers for WebRTC's Statistics API.widl | 468 + inputfiles/idl/Identity for WebRTC.widl | 31 +- inputfiles/idl/Media Capture and Streams.widl | 14 +- inputfiles/idl/Media Playback Quality.widl | 3 + inputfiles/idl/Notifications.widl | 6 +- inputfiles/idl/Payment Request.widl | 42 +- inputfiles/idl/Performance Timeline.widl | 9 +- inputfiles/idl/Permissions.widl | 20 +- inputfiles/idl/Push.widl | 6 +- inputfiles/idl/Resource Timing.widl | 4 +- ...te Systems, Transformations and Units.widl | 84 + inputfiles/idl/SVG - Document Structure.widl | 108 + inputfiles/idl/SVG - Embedded Content.widl | 19 + inputfiles/idl/SVG - Linking.widl | 22 + inputfiles/idl/SVG - Paths.widl | 7 + .../SVG - Scripting and Interactivity.widl | 11 + inputfiles/idl/SVG - Styling.widl | 8 + inputfiles/idl/SVG - Text.widl | 4 +- inputfiles/idl/Screen Orientation.widl | 4 +- inputfiles/idl/Selection.widl | 24 +- inputfiles/idl/Service Workers.widl | 34 +- inputfiles/idl/Streams.commentmap.json | 2 +- inputfiles/idl/Streams.widl | 279 +- inputfiles/idl/URL.widl | 8 +- inputfiles/idl/Web Authentication.widl | 33 +- inputfiles/idl/Web Cryptography.widl | 12 +- inputfiles/idl/Web Share.widl | 3 +- inputfiles/idl/WebVR.widl | 229 + inputfiles/idl/Worklets.widl | 12 - inputfiles/idl/XMLHttpRequest.commentmap.json | 12 +- inputfiles/idl/XMLHttpRequest.widl | 22 +- inputfiles/idl/XSLTProcessor.widl | 12 + inputfiles/idlSources.json | 69 +- inputfiles/knownTypes.json | 3 +- inputfiles/mdn/apiDescriptions.json | 14 +- inputfiles/overridingTypes.json | 46 +- inputfiles/removedTypes.json | 126 +- src/bcd.ts | 1 + src/emitter.ts | 2 +- 119 files changed, 2992 insertions(+), 97541 deletions(-) create mode 100644 inputfiles/idl/Content Security Policy.widl create mode 100644 inputfiles/idl/HTML - System states and capabilities.commentmap.json create mode 100644 inputfiles/idl/HTML - System states and capabilities.widl create mode 100644 inputfiles/idl/HTML - The Window object.commentmap.json create mode 100644 inputfiles/idl/HTML - The Window object.widl rename inputfiles/idl/{Web Messaging.commentmap.json => HTML - Web messaging.commentmap.json} (100%) rename inputfiles/idl/{Web Messaging.widl => HTML - Web messaging.widl} (67%) create mode 100644 inputfiles/idl/HTML - Worklets.commentmap.json create mode 100644 inputfiles/idl/HTML - Worklets.widl create mode 100644 inputfiles/idl/Identifiers for WebRTC's Statistics API.widl create mode 100644 inputfiles/idl/SVG - Coordinate Systems, Transformations and Units.widl create mode 100644 inputfiles/idl/SVG - Document Structure.widl create mode 100644 inputfiles/idl/SVG - Embedded Content.widl create mode 100644 inputfiles/idl/SVG - Linking.widl create mode 100644 inputfiles/idl/SVG - Paths.widl create mode 100644 inputfiles/idl/SVG - Scripting and Interactivity.widl create mode 100644 inputfiles/idl/SVG - Styling.widl create mode 100644 inputfiles/idl/WebVR.widl delete mode 100644 inputfiles/idl/Worklets.widl create mode 100644 inputfiles/idl/XSLTProcessor.widl diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index a4fbfeb39..dea045c8d 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -88,11 +88,6 @@ interface AudioBufferSourceOptions { playbackRate?: number; } -interface AudioContextInfo { - currentTime?: number; - sampleRate?: number; -} - interface AudioContextOptions { latencyHint?: AudioContextLatencyCategory | number; sampleRate?: number; @@ -135,15 +130,30 @@ interface AuthenticationExtensionsClientInputs { appid?: string; appidExclude?: string; credProps?: boolean; + largeBlob?: AuthenticationExtensionsLargeBlobInputs; uvm?: boolean; } interface AuthenticationExtensionsClientOutputs { appid?: boolean; + appidExclude?: boolean; credProps?: CredentialPropertiesOutput; + largeBlob?: AuthenticationExtensionsLargeBlobOutputs; uvm?: UvmEntries; } +interface AuthenticationExtensionsLargeBlobInputs { + read?: boolean; + support?: string; + write?: BufferSource; +} + +interface AuthenticationExtensionsLargeBlobOutputs { + blob?: ArrayBuffer; + supported?: boolean; + written?: boolean; +} + interface AuthenticatorSelectionCriteria { authenticatorAttachment?: AuthenticatorAttachment; requireResidentKey?: boolean; @@ -164,10 +174,6 @@ interface BlobPropertyBag { type?: string; } -interface ByteLengthChunk { - byteLength?: number; -} - interface CacheQueryOptions { ignoreMethod?: boolean; ignoreSearch?: boolean; @@ -222,10 +228,6 @@ interface ComputedKeyframe { [property: string]: string | number | null | undefined; } -interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation { - arrayOfDomainStrings?: string[]; -} - interface ConstantSourceOptions { offset?: number; } @@ -250,11 +252,6 @@ interface ConstrainULongRange extends ULongRange { ideal?: number; } -interface ConstrainVideoFacingModeParameters { - exact?: VideoFacingModeEnum | VideoFacingModeEnum[]; - ideal?: VideoFacingModeEnum | VideoFacingModeEnum[]; -} - interface ConvolverOptions extends AudioNodeOptions { buffer?: AudioBuffer | null; disableNormalization?: boolean; @@ -275,6 +272,11 @@ interface CredentialRequestOptions { signal?: AbortSignal; } +interface CryptoKeyPair { + privateKey?: CryptoKey; + publicKey?: CryptoKey; +} + interface CustomEventInit extends EventInit { detail?: T; } @@ -464,10 +466,6 @@ interface EventSourceInit { withCredentials?: boolean; } -interface ExceptionInformation { - domain?: string | null; -} - interface FilePropertyBag extends BlobPropertyBag { lastModified?: number; } @@ -476,21 +474,6 @@ interface FocusEventInit extends UIEventInit { relatedTarget?: EventTarget | null; } -interface FocusNavigationEventInit extends EventInit { - navigationReason?: string | null; - originHeight?: number; - originLeft?: number; - originTop?: number; - originWidth?: number; -} - -interface FocusNavigationOrigin { - originHeight?: number; - originLeft?: number; - originTop?: number; - originWidth?: number; -} - interface FocusOptions { preventScroll?: boolean; } @@ -696,14 +679,6 @@ interface MediaStreamConstraints { video?: boolean | MediaTrackConstraints; } -interface MediaStreamErrorEventInit extends EventInit { - error?: MediaStreamError | null; -} - -interface MediaStreamEventInit extends EventInit { - stream?: MediaStream; -} - interface MediaStreamTrackAudioSourceOptions { mediaStreamTrack: MediaStreamTrack; } @@ -1029,13 +1004,6 @@ interface PermissionDescriptor { name: PermissionName; } -interface PipeOptions { - preventAbort?: boolean; - preventCancel?: boolean; - preventClose?: boolean; - signal?: AbortSignal; -} - interface PointerEventInit extends MouseEventInit { height?: number; isPrimary?: boolean; @@ -1147,6 +1115,15 @@ interface QueuingStrategy { size?: QueuingStrategySizeCallback; } +interface QueuingStrategyInit { + /** + * Creates a new ByteLengthQueuingStrategy with the provided high water mark. + * + * Note that the provided high water mark will not be validated ahead of time. Instead, if it is negative, NaN, or not a number, the resulting ByteLengthQueuingStrategy will cause the corresponding stream constructor to throw. + */ + highWaterMark: number; +} + interface RTCAnswerOptions extends RTCOfferAnswerOptions { } @@ -1160,6 +1137,7 @@ interface RTCConfiguration { iceCandidatePoolSize?: number; iceServers?: RTCIceServer[]; iceTransportPolicy?: RTCIceTransportPolicy; + peerIdentity?: string; rtcpMuxPolicy?: RTCRtcpMuxPolicy; } @@ -1185,48 +1163,19 @@ interface RTCDtlsFingerprint { value?: string; } -interface RTCDtlsParameters { - fingerprints?: RTCDtlsFingerprint[]; - role?: RTCDtlsRole; -} - interface RTCErrorEventInit extends EventInit { error: RTCError; } interface RTCErrorInit { errorDetail: RTCErrorDetailType; + httpRequestStatusCode?: number; receivedAlert?: number; sctpCauseCode?: number; sdpLineNumber?: number; sentAlert?: number; } -interface RTCIceCandidateAttributes extends RTCStats { - addressSourceUrl?: string; - candidateType?: RTCStatsIceCandidateType; - ipAddress?: string; - portNumber?: number; - priority?: number; - transport?: string; -} - -interface RTCIceCandidateComplete { -} - -interface RTCIceCandidateDictionary { - foundation?: string; - ip?: string; - msMTurnSessionId?: string; - port?: number; - priority?: number; - protocol?: RTCIceProtocol; - relatedAddress?: string; - relatedPort?: number; - tcpType?: RTCIceTcpCandidateType; - type?: RTCIceCandidateType; -} - interface RTCIceCandidateInit { candidate?: string; sdpMLineIndex?: number | null; @@ -1242,22 +1191,39 @@ interface RTCIceCandidatePair { interface RTCIceCandidatePairStats extends RTCStats { availableIncomingBitrate?: number; availableOutgoingBitrate?: number; + bytesDiscardedOnSend?: number; bytesReceived?: number; bytesSent?: number; - localCandidateId?: string; + circuitBreakerTriggerCount?: number; + consentExpiredTimestamp?: number; + consentRequestBytesSent?: number; + consentRequestsSent?: number; + currentRoundTripTime?: number; + currentRtt?: number; + firstRequestTimestamp?: number; + lastPacketReceivedTimestamp?: number; + lastPacketSentTimestamp?: number; + lastRequestTimestamp?: number; + lastResponseTimestamp?: number; + localCandidateId: string; nominated?: boolean; + packetsDiscardedOnSend?: number; + packetsReceived?: number; + packetsSent?: number; priority?: number; - readable?: boolean; - remoteCandidateId?: string; - roundTripTime?: number; - state?: RTCStatsIceCandidatePairState; - transportId?: string; - writable?: boolean; -} - -interface RTCIceGatherOptions { - gatherPolicy?: RTCIceGatherPolicy; - iceservers?: RTCIceServer[]; + remoteCandidateId: string; + requestBytesSent?: number; + requestsReceived?: number; + requestsSent?: number; + responseBytesSent?: number; + responsesReceived?: number; + responsesSent?: number; + retransmissionsReceived?: number; + retransmissionsSent?: number; + state: RTCStatsIceCandidatePairState; + totalRoundTripTime?: number; + totalRtt?: number; + transportId: string; } interface RTCIceParameters { @@ -1278,36 +1244,11 @@ interface RTCIdentityProviderOptions { usernameHint?: string; } -interface RTCInboundRTPStreamStats extends RTCRTPStreamStats { - bytesReceived?: number; - fractionLost?: number; - jitter?: number; - packetsLost?: number; - packetsReceived?: number; -} - interface RTCLocalSessionDescriptionInit { sdp?: string; type?: RTCSdpType; } -interface RTCMediaStreamTrackStats extends RTCStats { - audioLevel?: number; - echoReturnLoss?: number; - echoReturnLossEnhancement?: number; - frameHeight?: number; - frameWidth?: number; - framesCorrupted?: number; - framesDecoded?: number; - framesDropped?: number; - framesPerSecond?: number; - framesReceived?: number; - framesSent?: number; - remoteSource?: boolean; - ssrcIds?: string[]; - trackIdentifier?: string; -} - interface RTCOfferAnswerOptions { } @@ -1317,13 +1258,6 @@ interface RTCOfferOptions extends RTCOfferAnswerOptions { offerToReceiveVideo?: boolean; } -interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats { - bytesSent?: number; - packetsSent?: number; - roundTripTime?: number; - targetBitrate?: number; -} - interface RTCPeerConnectionIceErrorEventInit extends EventInit { address?: string | null; errorCode: number; @@ -1337,25 +1271,6 @@ interface RTCPeerConnectionIceEventInit extends EventInit { url?: string | null; } -interface RTCRTPStreamStats extends RTCStats { - associateStatsId?: string; - codecId?: string; - firCount?: number; - isRemote?: boolean; - mediaTrackId?: string; - mediaType?: string; - nackCount?: number; - pliCount?: number; - sliCount?: number; - ssrc?: string; - transportId?: string; -} - -interface RTCRtcpFeedback { - parameter?: string; - type?: string; -} - interface RTCRtcpParameters { cname?: string; reducedSize?: boolean; @@ -1398,18 +1313,6 @@ interface RTCRtpEncodingParameters extends RTCRtpCodingParameters { scaleResolutionDownBy?: number; } -interface RTCRtpFecParameters { - mechanism?: string; - ssrc?: number; -} - -interface RTCRtpHeaderExtension { - kind?: string; - preferredEncrypt?: boolean; - preferredId?: number; - uri?: string; -} - interface RTCRtpHeaderExtensionCapability { uri?: string; } @@ -1429,10 +1332,6 @@ interface RTCRtpParameters { interface RTCRtpReceiveParameters extends RTCRtpParameters { } -interface RTCRtpRtxParameters { - ssrc?: number; -} - interface RTCRtpSendParameters extends RTCRtpParameters { encodings: RTCRtpEncodingParameters[]; transactionId: string; @@ -1448,46 +1347,17 @@ interface RTCRtpTransceiverInit { streams?: MediaStream[]; } -interface RTCRtpUnhandled { - muxId?: string; - payloadType?: number; - ssrc?: number; -} - interface RTCSessionDescriptionInit { sdp?: string; type: RTCSdpType; } -interface RTCSrtpKeyParam { - keyMethod?: string; - keySalt?: string; - lifetime?: string; - mkiLength?: number; - mkiValue?: number; -} - -interface RTCSrtpSdesParameters { - cryptoSuite?: string; - keyParams?: RTCSrtpKeyParam[]; - sessionParams?: string[]; - tag?: number; -} - -interface RTCSsrcRange { - max?: number; - min?: number; -} - interface RTCStats { id: string; timestamp: number; type: RTCStatsType; } -interface RTCStatsReport { -} - interface RTCTrackEventInit extends EventInit { receiver: RTCRtpReceiver; streams?: MediaStream[]; @@ -1496,23 +1366,47 @@ interface RTCTrackEventInit extends EventInit { } interface RTCTransportStats extends RTCStats { - activeConnection?: boolean; bytesReceived?: number; bytesSent?: number; + dtlsCipher?: string; + dtlsState: RTCDtlsTransportState; + iceLocalUsernameFragment?: string; + iceRole?: RTCIceRole; + iceState?: RTCIceTransportState; localCertificateId?: string; + packetsReceived?: number; + packetsSent?: number; remoteCertificateId?: string; rtcpTransportStatsId?: string; + selectedCandidatePairChanges?: number; selectedCandidatePairId?: string; + srtpCipher?: string; + tlsGroup?: string; + tlsVersion?: string; +} + +interface ReadableStreamDefaultReadResult { + done?: boolean; + value?: any; } -interface ReadableStreamReadDoneResult { - done: true; - value?: T; +interface ReadableStreamGetReaderOptions { + /** + * Creates a ReadableStreamBYOBReader and locks the stream to the new reader. + * + * This call behaves the same way as the no-argument variant, except that it only works on readable byte streams, i.e. streams which were constructed specifically with the ability to handle "bring your own buffer" reading. The returned BYOB reader provides the ability to directly read individual chunks from the stream via its read() method, into developer-supplied buffers, allowing more precise control over allocation. + */ + mode?: ReadableStreamReaderMode; } -interface ReadableStreamReadValueResult { - done: false; - value: T; +interface ReadableWritablePair { + readable: ReadableStream; + /** + * Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use. + * + * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader. + */ + writable: WritableStream; } interface RegistrationOptions { @@ -1642,14 +1536,16 @@ interface ScrollToOptions extends ScrollOptions { interface SecurityPolicyViolationEventInit extends EventInit { blockedURI?: string; columnNumber?: number; - documentURI?: string; - effectiveDirective?: string; + disposition: SecurityPolicyViolationEventDisposition; + documentURI: string; + effectiveDirective: string; lineNumber?: number; - originalPolicy?: string; + originalPolicy: string; referrer?: string; + sample?: string; sourceFile?: string; - statusCode?: number; - violatedDirective?: string; + statusCode: number; + violatedDirective: string; } interface ShadowRootInit { @@ -1658,6 +1554,7 @@ interface ShadowRootInit { } interface ShareData { + files?: File[]; text?: string; title?: string; url?: string; @@ -1709,14 +1606,32 @@ interface StorageEventInit extends EventInit { url?: string; } -interface StoreExceptionsInformation extends ExceptionInformation { - detailURI?: string | null; - explanationString?: string | null; - siteName?: string | null; +interface StreamPipeOptions { + preventAbort?: boolean; + preventCancel?: boolean; + /** + * Pipes this readable stream to a given writable stream destination. The way in which the piping process behaves under various error conditions can be customized with a number of passed options. It returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered. + * + * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader. + * + * Errors and closures of the source and destination streams propagate as follows: + * + * An error in this source readable stream will abort destination, unless preventAbort is truthy. The returned promise will be rejected with the source's error, or with any error that occurs during aborting the destination. + * + * An error in destination will cancel this source readable stream, unless preventCancel is truthy. The returned promise will be rejected with the destination's error, or with any error that occurs during canceling the source. + * + * When this source readable stream closes, destination will be closed, unless preventClose is truthy. The returned promise will be fulfilled once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error. + * + * If destination starts out closed or closing, this source readable stream will be canceled, unless preventCancel is true. The returned promise will be rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source. + * + * The signal option can be set to an AbortSignal to allow aborting an ongoing pipe operation via the corresponding AbortController. In this case, this source readable stream will be canceled, and destination aborted, unless the respective options preventCancel or preventAbort are set. + */ + preventClose?: boolean; + signal?: AbortSignal; } -interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation { - arrayOfDomainStrings?: string[]; +interface SubmitEventInit extends EventInit { + submitter?: HTMLElement | null; } interface TextDecodeOptions { @@ -1761,14 +1676,6 @@ interface TrackEventInit extends EventInit { track?: TextTrack | null; } -interface Transformer { - flush?: TransformStreamDefaultControllerCallback; - readableType?: undefined; - start?: TransformStreamDefaultControllerCallback; - transform?: TransformStreamDefaultControllerTransformCallback; - writableType?: undefined; -} - interface TransitionEventInit extends EventInit { elapsedTime?: number; propertyName?: string; @@ -1785,36 +1692,15 @@ interface ULongRange { min?: number; } -interface UnderlyingSink { - abort?: WritableStreamErrorCallback; - close?: WritableStreamDefaultControllerCloseCallback; - start?: WritableStreamDefaultControllerStartCallback; - type?: undefined; - write?: WritableStreamDefaultControllerWriteCallback; -} - -interface UnderlyingSource { - cancel?: ReadableStreamErrorCallback; - pull?: ReadableStreamDefaultControllerCallback; - start?: ReadableStreamDefaultControllerCallback; - type?: undefined; -} - interface VRDisplayEventInit extends EventInit { display: VRDisplay; reason?: VRDisplayEventReason; } -interface VRLayer { - leftBounds?: number[] | Float32Array | null; - rightBounds?: number[] | Float32Array | null; - source?: HTMLCanvasElement | null; -} - -interface VRStageParameters { - sittingToStandingTransform?: Float32Array; - sizeX?: number; - sizeY?: number; +interface VRLayerInit { + leftBounds?: number[] | Float32Array; + rightBounds?: number[] | Float32Array; + source?: VRSource | null; } interface WaveShaperOptions extends AudioNodeOptions { @@ -1845,6 +1731,10 @@ interface WheelEventInit extends MouseEventInit { deltaZ?: number; } +interface WindowPostMessageOptions extends PostMessageOptions { + targetOrigin?: string; +} + interface WorkerOptions { credentials?: RequestCredentials; name?: string; @@ -1859,6 +1749,8 @@ interface EventListener { (evt: Event): void; } +type NodeFilter = ((node: Node) => number) | { acceptNode(node: Node): number; }; + type XPathNSResolver = ((prefix: string | null) => string | null) | { lookupNamespaceURI(prefix: string | null): string | null; }; /** The ANGLE_instanced_arrays extension is part of the WebGL API and allows to draw the same object, or groups of similar objects multiple times, if they share the same vertex data, primitive count and type. */ @@ -2089,12 +1981,29 @@ interface ApplicationCache extends EventTarget { onprogress: ((this: ApplicationCache, ev: ProgressEvent) => any) | null; /** @deprecated */ onupdateready: ((this: ApplicationCache, ev: Event) => any) | null; + /** + * Returns the current status of the application cache, as given by the constants defined below. + */ /** @deprecated */ readonly status: number; + /** + * Cancels the application cache download process. + * + * This method is intended to be used by web application showing their own caching progress UI, in case the user wants to stop the update (e.g. because bandwidth is limited). + */ /** @deprecated */ abort(): void; /** @deprecated */ swapCache(): void; + /** + * Invokes the application cache download process. + * + * Throws an "InvalidStateError" DOMException if there is no application cache to update. + * + * Calling this method is not usually necessary, as user agents will generally take care of updating application caches automatically. + * + * The method can be useful in situations such as long-lived applications. For example, a web mail application might stay open in a browser tab for weeks at a time. Such an application could want to test for updates each day. + */ /** @deprecated */ update(): void; readonly CHECKING: number; @@ -2430,28 +2339,6 @@ declare var BeforeUnloadEvent: { new(): BeforeUnloadEvent; }; -interface BhxBrowser { - readonly lastError: DOMException; - checkMatchesGlobExpression(pattern: string, value: string): boolean; - checkMatchesUriExpression(pattern: string, value: string): boolean; - clearLastError(): void; - currentWindowId(): number; - fireExtensionApiTelemetry(functionName: string, isSucceeded: boolean, isSupported: boolean, errorString: string): void; - genericFunction(functionId: number, destination: any, parameters?: string, callbackId?: number): void; - genericSynchronousFunction(functionId: number, parameters?: string): string; - getExtensionId(): string; - getThisAddress(): any; - registerGenericFunctionCallbackHandler(callbackHandler: Function): void; - registerGenericListenerHandler(eventHandler: Function): void; - setLastError(parameters: string): void; - webPlatformGenericFunction(destination: any, parameters?: string, callbackId?: number): void; -} - -declare var BhxBrowser: { - prototype: BhxBrowser; - new(): BhxBrowser; -}; - /** A simple low-order filter, and is created using the AudioContext.createBiquadFilter() method. It is an AudioNode that can represent different kinds of filters, tone control devices, and graphic equalizers. */ interface BiquadFilterNode extends AudioNode { readonly Q: AudioParam; @@ -2525,8 +2412,8 @@ declare var BroadcastChannel: { /** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */ interface ByteLengthQueuingStrategy extends QueuingStrategy { - highWaterMark: number; - size(chunk: ArrayBufferView): number; + readonly highWaterMark: number; + readonly size: Function; } declare var ByteLengthQueuingStrategy: { @@ -2797,6 +2684,7 @@ interface CSSStyleDeclaration { cssFloat: string; cssText: string; cursor: string; + d: string; direction: string; display: string; dominantBaseline: string; @@ -2968,6 +2856,7 @@ interface CSSStyleDeclaration { textDecorationColor: string; textDecorationLine: string; textDecorationStyle: string; + textEdge: string; textEmphasis: string; textEmphasisColor: string; textEmphasisPosition: string; @@ -2994,6 +2883,7 @@ interface CSSStyleDeclaration { translate: string; unicodeBidi: string; userSelect: string; + vectorEffect: string; verticalAlign: string; visibility: string; /** @deprecated */ @@ -3456,31 +3346,6 @@ interface ChildNode extends Node { replaceWith(...nodes: (Node | string)[]): void; } -interface ClientRect { - bottom: number; - readonly height: number; - left: number; - right: number; - top: number; - readonly width: number; -} - -declare var ClientRect: { - prototype: ClientRect; - new(): ClientRect; -}; - -interface ClientRectList { - readonly length: number; - item(index: number): ClientRect; - [index: number]: ClientRect; -} - -declare var ClientRectList: { - prototype: ClientRectList; - new(): ClientRectList; -}; - interface Clipboard extends EventTarget { readText(): Promise; writeText(data: string): Promise; @@ -3575,8 +3440,9 @@ declare var ConvolverNode: { }; /** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */ -interface CountQueuingStrategy extends QueuingStrategy { - highWaterMark: number; +interface CountQueuingStrategy { + readonly highWaterMark: number; + readonly size: Function; size(chunk: any): 1; } @@ -3631,22 +3497,11 @@ declare var CryptoKey: { new(): CryptoKey; }; -/** The CryptoKeyPair dictionary of the Web Crypto API represents a key pair for an asymmetric cryptography algorithm, also known as a public-key algorithm. */ -interface CryptoKeyPair { - privateKey: CryptoKey; - publicKey: CryptoKey; -} - -declare var CryptoKeyPair: { - prototype: CryptoKeyPair; - new(): CryptoKeyPair; -}; - interface CustomElementRegistry { define(name: string, constructor: CustomElementConstructor, options?: ElementDefinitionOptions): void; - get(name: string): any; + get(name: string): CustomElementConstructor | undefined; upgrade(root: Node): void; - whenDefined(name: string): Promise; + whenDefined(name: string): Promise; } declare var CustomElementRegistry: { @@ -3971,15 +3826,6 @@ declare var DOMRectReadOnly: { fromRect(other?: DOMRectInit): DOMRectReadOnly; }; -interface DOMSettableTokenList extends DOMTokenList { - value: string; -} - -declare var DOMSettableTokenList: { - prototype: DOMSettableTokenList; - new(): DOMSettableTokenList; -}; - /** A type returned by some APIs which contains a list of DOMString (strings). */ interface DOMStringList { /** @@ -4084,19 +3930,6 @@ declare var DOMTokenList: { new(): DOMTokenList; }; -interface DataCue extends TextTrackCue { - data: ArrayBuffer; - addEventListener(type: K, listener: (this: DataCue, ev: TextTrackCueEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: DataCue, ev: TextTrackCueEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; -} - -declare var DataCue: { - prototype: DataCue; - new(): DataCue; -}; - /** Used to hold the data that is being dragged during a drag and drop operation. It may hold one or more data items, each of one or more data types. For more information about drag and drop, see HTML Drag and Drop API. */ interface DataTransfer { /** @@ -4204,19 +4037,6 @@ declare var DataTransferItemList: { new(): DataTransferItemList; }; -interface DeferredPermissionRequest { - readonly id: number; - readonly type: MSWebViewPermissionType; - readonly uri: string; - allow(): void; - deny(): void; -} - -declare var DeferredPermissionRequest: { - prototype: DeferredPermissionRequest; - new(): DeferredPermissionRequest; -}; - /** A delay-line; an AudioNode audio-processing module that causes a delay between the arrival of an input data and its propagation to the output. */ interface DelayNode extends AudioNode { readonly delayTime: AudioParam; @@ -4227,18 +4047,6 @@ declare var DelayNode: { new(context: BaseAudioContext, options?: DelayOptions): DelayNode; }; -/** Provides information about the amount of acceleration the device is experiencing along all three axes. */ -interface DeviceAcceleration { - readonly x: number | null; - readonly y: number | null; - readonly z: number | null; -} - -declare var DeviceAcceleration: { - prototype: DeviceAcceleration; - new(): DeviceAcceleration; -}; - /** The DeviceMotionEvent provides web developers with information about the speed of changes for the device's position and orientation. */ interface DeviceMotionEvent extends Event { readonly acceleration: DeviceMotionEventAcceleration | null; @@ -4279,18 +4087,6 @@ declare var DeviceOrientationEvent: { requestPermission(): Promise; }; -/** Provides information about the rate at which the device is rotating around all three axes. */ -interface DeviceRotationRate { - readonly alpha: number | null; - readonly beta: number | null; - readonly gamma: number | null; -} - -declare var DeviceRotationRate: { - prototype: DeviceRotationRate; - new(): DeviceRotationRate; -}; - interface DhImportKeyParams extends Algorithm { generator: Uint8Array; prime: Uint8Array; @@ -4344,7 +4140,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * Retrieves a collection of all applet objects in the document. */ /** @deprecated */ - readonly applets: HTMLCollectionOf; + readonly applets: HTMLCollection; /** * Deprecated. Sets or retrieves a value that indicates the background color behind the object. */ @@ -4485,6 +4281,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * Gets the URL of the location that referred the user to the current page. */ readonly referrer: string; + readonly rootElement: SVGSVGElement | null; /** * Retrieves a collection of all script objects in the document. */ @@ -4580,18 +4377,14 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "Event"): Event; createEvent(eventInterface: "Events"): Event; createEvent(eventInterface: "FocusEvent"): FocusEvent; - createEvent(eventInterface: "FocusNavigationEvent"): FocusNavigationEvent; createEvent(eventInterface: "GamepadEvent"): GamepadEvent; createEvent(eventInterface: "HashChangeEvent"): HashChangeEvent; createEvent(eventInterface: "IDBVersionChangeEvent"): IDBVersionChangeEvent; createEvent(eventInterface: "InputEvent"): InputEvent; createEvent(eventInterface: "KeyboardEvent"): KeyboardEvent; - createEvent(eventInterface: "ListeningStateChangedEvent"): ListeningStateChangedEvent; createEvent(eventInterface: "MediaEncryptedEvent"): MediaEncryptedEvent; createEvent(eventInterface: "MediaKeyMessageEvent"): MediaKeyMessageEvent; createEvent(eventInterface: "MediaQueryListEvent"): MediaQueryListEvent; - createEvent(eventInterface: "MediaStreamErrorEvent"): MediaStreamErrorEvent; - createEvent(eventInterface: "MediaStreamEvent"): MediaStreamEvent; createEvent(eventInterface: "MediaStreamTrackEvent"): MediaStreamTrackEvent; createEvent(eventInterface: "MessageEvent"): MessageEvent; createEvent(eventInterface: "MouseEvent"): MouseEvent; @@ -4599,42 +4392,32 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "MutationEvent"): MutationEvent; createEvent(eventInterface: "MutationEvents"): MutationEvent; createEvent(eventInterface: "OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent; - createEvent(eventInterface: "OverflowEvent"): OverflowEvent; createEvent(eventInterface: "PageTransitionEvent"): PageTransitionEvent; createEvent(eventInterface: "PaymentMethodChangeEvent"): PaymentMethodChangeEvent; createEvent(eventInterface: "PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent; - createEvent(eventInterface: "PermissionRequestedEvent"): PermissionRequestedEvent; createEvent(eventInterface: "PointerEvent"): PointerEvent; createEvent(eventInterface: "PopStateEvent"): PopStateEvent; createEvent(eventInterface: "ProgressEvent"): ProgressEvent; createEvent(eventInterface: "PromiseRejectionEvent"): PromiseRejectionEvent; createEvent(eventInterface: "RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent; createEvent(eventInterface: "RTCDataChannelEvent"): RTCDataChannelEvent; - createEvent(eventInterface: "RTCDtlsTransportStateChangedEvent"): RTCDtlsTransportStateChangedEvent; createEvent(eventInterface: "RTCErrorEvent"): RTCErrorEvent; - createEvent(eventInterface: "RTCIceCandidatePairChangedEvent"): RTCIceCandidatePairChangedEvent; - createEvent(eventInterface: "RTCIceGathererEvent"): RTCIceGathererEvent; - createEvent(eventInterface: "RTCIceTransportStateChangedEvent"): RTCIceTransportStateChangedEvent; createEvent(eventInterface: "RTCPeerConnectionIceErrorEvent"): RTCPeerConnectionIceErrorEvent; createEvent(eventInterface: "RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent; - createEvent(eventInterface: "RTCSsrcConflictEvent"): RTCSsrcConflictEvent; createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEvent; - createEvent(eventInterface: "SVGZoomEvent"): SVGZoomEvent; - createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent; createEvent(eventInterface: "SpeechRecognitionErrorEvent"): SpeechRecognitionErrorEvent; createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent; createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent; createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent; createEvent(eventInterface: "StorageEvent"): StorageEvent; - createEvent(eventInterface: "TextEvent"): TextEvent; + createEvent(eventInterface: "SubmitEvent"): SubmitEvent; createEvent(eventInterface: "TouchEvent"): TouchEvent; createEvent(eventInterface: "TrackEvent"): TrackEvent; createEvent(eventInterface: "TransitionEvent"): TransitionEvent; createEvent(eventInterface: "UIEvent"): UIEvent; createEvent(eventInterface: "UIEvents"): UIEvent; createEvent(eventInterface: "VRDisplayEvent"): VRDisplayEvent; - createEvent(eventInterface: "VRDisplayEvent "): VRDisplayEvent ; createEvent(eventInterface: "WebGLContextEvent"): WebGLContextEvent; createEvent(eventInterface: "WheelEvent"): WheelEvent; createEvent(eventInterface: string): Event; @@ -4792,6 +4575,9 @@ declare var Document: { new(): Document; }; +type HTMLDocument = Document; +declare var HTMLDocument: typeof Document; + interface DocumentAndElementEventHandlersEventMap { "copy": ClipboardEvent; "cut": ClipboardEvent; @@ -4808,82 +4594,6 @@ interface DocumentAndElementEventHandlers { removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } -interface DocumentEvent { - createEvent(eventInterface: "AnimationEvent"): AnimationEvent; - createEvent(eventInterface: "AnimationPlaybackEvent"): AnimationPlaybackEvent; - createEvent(eventInterface: "AudioProcessingEvent"): AudioProcessingEvent; - createEvent(eventInterface: "BeforeUnloadEvent"): BeforeUnloadEvent; - createEvent(eventInterface: "ClipboardEvent"): ClipboardEvent; - createEvent(eventInterface: "CloseEvent"): CloseEvent; - createEvent(eventInterface: "CompositionEvent"): CompositionEvent; - createEvent(eventInterface: "CustomEvent"): CustomEvent; - createEvent(eventInterface: "DeviceMotionEvent"): DeviceMotionEvent; - createEvent(eventInterface: "DeviceOrientationEvent"): DeviceOrientationEvent; - createEvent(eventInterface: "DragEvent"): DragEvent; - createEvent(eventInterface: "ErrorEvent"): ErrorEvent; - createEvent(eventInterface: "Event"): Event; - createEvent(eventInterface: "Events"): Event; - createEvent(eventInterface: "FocusEvent"): FocusEvent; - createEvent(eventInterface: "FocusNavigationEvent"): FocusNavigationEvent; - createEvent(eventInterface: "GamepadEvent"): GamepadEvent; - createEvent(eventInterface: "HashChangeEvent"): HashChangeEvent; - createEvent(eventInterface: "IDBVersionChangeEvent"): IDBVersionChangeEvent; - createEvent(eventInterface: "InputEvent"): InputEvent; - createEvent(eventInterface: "KeyboardEvent"): KeyboardEvent; - createEvent(eventInterface: "ListeningStateChangedEvent"): ListeningStateChangedEvent; - createEvent(eventInterface: "MediaEncryptedEvent"): MediaEncryptedEvent; - createEvent(eventInterface: "MediaKeyMessageEvent"): MediaKeyMessageEvent; - createEvent(eventInterface: "MediaQueryListEvent"): MediaQueryListEvent; - createEvent(eventInterface: "MediaStreamErrorEvent"): MediaStreamErrorEvent; - createEvent(eventInterface: "MediaStreamEvent"): MediaStreamEvent; - createEvent(eventInterface: "MediaStreamTrackEvent"): MediaStreamTrackEvent; - createEvent(eventInterface: "MessageEvent"): MessageEvent; - createEvent(eventInterface: "MouseEvent"): MouseEvent; - createEvent(eventInterface: "MouseEvents"): MouseEvent; - createEvent(eventInterface: "MutationEvent"): MutationEvent; - createEvent(eventInterface: "MutationEvents"): MutationEvent; - createEvent(eventInterface: "OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent; - createEvent(eventInterface: "OverflowEvent"): OverflowEvent; - createEvent(eventInterface: "PageTransitionEvent"): PageTransitionEvent; - createEvent(eventInterface: "PaymentMethodChangeEvent"): PaymentMethodChangeEvent; - createEvent(eventInterface: "PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent; - createEvent(eventInterface: "PermissionRequestedEvent"): PermissionRequestedEvent; - createEvent(eventInterface: "PointerEvent"): PointerEvent; - createEvent(eventInterface: "PopStateEvent"): PopStateEvent; - createEvent(eventInterface: "ProgressEvent"): ProgressEvent; - createEvent(eventInterface: "PromiseRejectionEvent"): PromiseRejectionEvent; - createEvent(eventInterface: "RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent; - createEvent(eventInterface: "RTCDataChannelEvent"): RTCDataChannelEvent; - createEvent(eventInterface: "RTCDtlsTransportStateChangedEvent"): RTCDtlsTransportStateChangedEvent; - createEvent(eventInterface: "RTCErrorEvent"): RTCErrorEvent; - createEvent(eventInterface: "RTCIceCandidatePairChangedEvent"): RTCIceCandidatePairChangedEvent; - createEvent(eventInterface: "RTCIceGathererEvent"): RTCIceGathererEvent; - createEvent(eventInterface: "RTCIceTransportStateChangedEvent"): RTCIceTransportStateChangedEvent; - createEvent(eventInterface: "RTCPeerConnectionIceErrorEvent"): RTCPeerConnectionIceErrorEvent; - createEvent(eventInterface: "RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent; - createEvent(eventInterface: "RTCSsrcConflictEvent"): RTCSsrcConflictEvent; - createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEvent; - createEvent(eventInterface: "SVGZoomEvent"): SVGZoomEvent; - createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; - createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent; - createEvent(eventInterface: "SpeechRecognitionErrorEvent"): SpeechRecognitionErrorEvent; - createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent; - createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent; - createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent; - createEvent(eventInterface: "StorageEvent"): StorageEvent; - createEvent(eventInterface: "TextEvent"): TextEvent; - createEvent(eventInterface: "TouchEvent"): TouchEvent; - createEvent(eventInterface: "TrackEvent"): TrackEvent; - createEvent(eventInterface: "TransitionEvent"): TransitionEvent; - createEvent(eventInterface: "UIEvent"): UIEvent; - createEvent(eventInterface: "UIEvents"): UIEvent; - createEvent(eventInterface: "VRDisplayEvent"): VRDisplayEvent; - createEvent(eventInterface: "VRDisplayEvent "): VRDisplayEvent ; - createEvent(eventInterface: "WebGLContextEvent"): WebGLContextEvent; - createEvent(eventInterface: "WheelEvent"): WheelEvent; - createEvent(eventInterface: string): Event; -} - /** A minimal document object that has no parent. It is used as a lightweight version of Document that stores a segment of a document structure comprised of nodes just like a standard document. The key difference is that because the document fragment isn't part of the active document tree structure, changes made to the fragment don't affect the document, cause reflow, or incur any performance impact that can occur when changes are made. */ interface DocumentFragment extends Node, NonElementParentNode, ParentNode { readonly ownerDocument: Document; @@ -5335,23 +5045,6 @@ declare var EventTarget: { new(): EventTarget; }; -interface ExtensionScriptApis { - extensionIdToShortId(extensionId: string): number; - fireExtensionApiTelemetry(functionName: string, isSucceeded: boolean, isSupported: boolean, errorString: string): void; - genericFunction(routerAddress: any, parameters?: string, callbackId?: number): void; - genericSynchronousFunction(functionId: number, parameters?: string): string; - genericWebRuntimeCallout(to: any, from: any, payload: string): void; - getExtensionId(): string; - registerGenericFunctionCallbackHandler(callbackHandler: Function): void; - registerGenericPersistentCallbackHandler(callbackHandler: Function): void; - registerWebRuntimeCallbackHandler(handler: Function): any; -} - -declare var ExtensionScriptApis: { - prototype: ExtensionScriptApis; - new(): ExtensionScriptApis; -}; - interface External { /** @deprecated */ AddSearchProvider(): void; @@ -5439,20 +5132,6 @@ declare var FocusEvent: { new(type: string, eventInitDict?: FocusEventInit): FocusEvent; }; -interface FocusNavigationEvent extends Event { - readonly navigationReason: NavigationReason; - readonly originHeight: number; - readonly originLeft: number; - readonly originTop: number; - readonly originWidth: number; - requestFocus(): void; -} - -declare var FocusNavigationEvent: { - prototype: FocusNavigationEvent; - new(type: string, eventInitDict?: FocusNavigationEventInit): FocusNavigationEvent; -}; - /** Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data". */ interface FormData { append(name: string, value: string | Blob, fileName?: string): void; @@ -5549,24 +5228,7 @@ declare var GamepadPose: { }; interface GenericTransformStream { - /** - * Returns a readable stream whose chunks are strings resulting from running encoding's decoder on the chunks written to writable. - */ readonly readable: ReadableStream; - /** - * Returns a writable stream which accepts [AllowShared] BufferSource chunks and runs them through encoding's decoder before making them available to readable. - * - * Typically this will be used via the pipeThrough() method on a ReadableStream source. - * - * ``` - * var decoder = new TextDecoderStream(encoding); - * byteReadable - * .pipeThrough(decoder) - * .pipeTo(textWritable); - * ``` - * - * If the error mode is "fatal" and encoding's decoder returns error, both readable and writable will be errored with a TypeError. - */ readonly writable: WritableStream; } @@ -5630,7 +5292,7 @@ interface GlobalEventHandlersEventMap { "animationiteration": AnimationEvent; "animationstart": AnimationEvent; "auxclick": MouseEvent; - "blur": FocusEvent; + "blur": Event; "cancel": Event; "canplay": Event; "canplaythrough": Event; @@ -5643,7 +5305,6 @@ interface GlobalEventHandlersEventMap { "drag": DragEvent; "dragend": DragEvent; "dragenter": DragEvent; - "dragexit": Event; "dragleave": DragEvent; "dragover": DragEvent; "dragstart": DragEvent; @@ -5652,7 +5313,7 @@ interface GlobalEventHandlersEventMap { "emptied": Event; "ended": Event; "error": ErrorEvent; - "focus": FocusEvent; + "focus": Event; "focusin": FocusEvent; "focusout": FocusEvent; "gotpointercapture": PointerEvent; @@ -5687,7 +5348,7 @@ interface GlobalEventHandlersEventMap { "progress": ProgressEvent; "ratechange": Event; "reset": Event; - "resize": UIEvent; + "resize": Event; "scroll": Event; "securitypolicyviolation": SecurityPolicyViolationEvent; "seeked": Event; @@ -5710,6 +5371,10 @@ interface GlobalEventHandlersEventMap { "transitionstart": TransitionEvent; "volumechange": Event; "waiting": Event; + "webkitanimationend": Event; + "webkitanimationiteration": Event; + "webkitanimationstart": Event; + "webkittransitionend": Event; "wheel": WheelEvent; } @@ -5728,7 +5393,7 @@ interface GlobalEventHandlers { * Fires when the object loses the input focus. * @param ev The focus event. */ - onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null; + onblur: ((this: GlobalEventHandlers, ev: Event) => any) | null; oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** * Occurs when playback is possible, but would require further buffering. @@ -5773,7 +5438,6 @@ interface GlobalEventHandlers { * @param ev The drag event. */ ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null; - ondragexit: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation. * @param ev The drag event. @@ -5814,7 +5478,7 @@ interface GlobalEventHandlers { * Fires when the object receives focus. * @param ev The event. */ - onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null; + onfocus: ((this: GlobalEventHandlers, ev: Event) => any) | null; ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null; oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null; @@ -5919,7 +5583,7 @@ interface GlobalEventHandlers { * @param ev The event. */ onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null; - onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null; + onresize: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** * Fires when the user repositions the scroll box in the scroll bar on the object. * @param ev The event. @@ -5978,6 +5642,10 @@ interface GlobalEventHandlers { * @param ev The event. */ onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null; + onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null; + onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null; + onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null; + onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null; onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null; addEventListener(type: K, listener: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -6069,56 +5737,6 @@ declare var HTMLAnchorElement: { new(): HTMLAnchorElement; }; -interface HTMLAppletElement extends HTMLElement { - /** @deprecated */ - align: string; - /** - * Sets or retrieves a text alternative to the graphic. - */ - /** @deprecated */ - alt: string; - /** - * Sets or retrieves a character string that can be used to implement your own archive functionality for the object. - */ - /** @deprecated */ - archive: string; - /** @deprecated */ - code: string; - /** - * Sets or retrieves the URL of the component. - */ - /** @deprecated */ - codeBase: string; - readonly form: HTMLFormElement | null; - /** - * Sets or retrieves the height of the object. - */ - /** @deprecated */ - height: string; - /** @deprecated */ - hspace: number; - /** - * Sets or retrieves the shape of the object. - */ - /** @deprecated */ - name: string; - /** @deprecated */ - object: string; - /** @deprecated */ - vspace: number; - /** @deprecated */ - width: string; - addEventListener(type: K, listener: (this: HTMLAppletElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLAppletElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; -} - -declare var HTMLAppletElement: { - prototype: HTMLAppletElement; - new(): HTMLAppletElement; -}; - /** Provides special properties and methods (beyond those of the regular object HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of elements. */ interface HTMLAreaElement extends HTMLElement, HTMLHyperlinkElementUtils { /** @@ -6413,6 +6031,9 @@ declare var HTMLDataElement: { /** Provides special properties (beyond the HTMLElement object interface it also has available to it by inheritance) to manipulate elements and their content. */ interface HTMLDataListElement extends HTMLElement { + /** + * Returns an HTMLCollection of the option elements of the datalist element. + */ readonly options: HTMLCollectionOf; addEventListener(type: K, listener: (this: HTMLDataListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -6441,7 +6062,15 @@ declare var HTMLDetailsElement: { interface HTMLDialogElement extends HTMLElement { open: boolean; returnValue: string; + /** + * Closes the dialog element. + * + * The argument, if provided, provides a return value. + */ close(returnValue?: string): void; + /** + * Displays the dialog element. + */ show(): void; showModal(): void; addEventListener(type: K, listener: (this: HTMLDialogElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -6487,19 +6116,6 @@ declare var HTMLDivElement: { new(): HTMLDivElement; }; -/** The HTMLDocument property of Window objects is an alias that browsers expose for the Document interface object. */ -interface HTMLDocument extends Document { - addEventListener(type: K, listener: (this: HTMLDocument, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLDocument, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; -} - -declare var HTMLDocument: { - prototype: HTMLDocument; - new(): HTMLDocument; -}; - interface HTMLElementEventMap extends ElementEventMap, GlobalEventHandlersEventMap, DocumentAndElementEventHandlersEventMap { } @@ -6570,12 +6186,18 @@ declare var HTMLEmbedElement: { /** Provides special properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of
elements. */ interface HTMLFieldSetElement extends HTMLElement { disabled: boolean; + /** + * Returns an HTMLCollection of the form controls in the element. + */ readonly elements: HTMLCollection; /** * Retrieves a reference to the form that the object is embedded in. */ readonly form: HTMLFormElement | null; name: string; + /** + * Returns the string "fieldset". + */ readonly type: string; /** * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. @@ -6889,17 +6511,70 @@ declare var HTMLHtmlElement: { }; interface HTMLHyperlinkElementUtils { + /** + * Returns the hyperlink's URL's fragment (includes leading "#" if non-empty). + * + * Can be set, to change the URL's fragment (ignores leading "#"). + */ hash: string; + /** + * Returns the hyperlink's URL's host and port (if different from the default port for the scheme). + * + * Can be set, to change the URL's host and port. + */ host: string; + /** + * Returns the hyperlink's URL's host. + * + * Can be set, to change the URL's host. + */ hostname: string; + /** + * Returns the hyperlink's URL. + * + * Can be set, to change the URL. + */ href: string; toString(): string; + /** + * Returns the hyperlink's URL's origin. + */ readonly origin: string; + /** + * Returns the hyperlink's URL's password. + * + * Can be set, to change the URL's password. + */ password: string; + /** + * Returns the hyperlink's URL's path. + * + * Can be set, to change the URL's path. + */ pathname: string; + /** + * Returns the hyperlink's URL's port. + * + * Can be set, to change the URL's port. + */ port: string; + /** + * Returns the hyperlink's URL's scheme. + * + * Can be set, to change the URL's scheme. + */ protocol: string; + /** + * Returns the hyperlink's URL's query (includes leading "?" if non-empty). + * + * Can be set, to change the URL's query (ignores leading "?"). + */ search: string; + /** + * Returns the hyperlink's URL's username. + * + * Can be set, to change the URL's username. + */ username: string; } @@ -6912,7 +6587,6 @@ interface HTMLIFrameElement extends HTMLElement { align: string; allow: string; allowFullscreen: boolean; - allowPaymentRequest: boolean; /** * Retrieves the document object of the page or frame. */ @@ -6930,6 +6604,7 @@ interface HTMLIFrameElement extends HTMLElement { * Sets or retrieves the height of the object. */ height: string; + loading: string; /** * Sets or retrieves a URI to a long description of the object. */ @@ -7136,6 +6811,9 @@ interface HTMLInputElement extends HTMLElement { * Sets or retrieves the height of the object. */ height: number; + /** + * When set, overrides the rendering of checkbox controls so that the current value is not visible. + */ indeterminate: boolean; readonly labels: NodeListOf | null; /** @@ -7296,6 +6974,9 @@ declare var HTMLLIElement: { /** Gives access to properties specific to