From 720ea39c79ab35045bf1d769d99fa17ccab77485 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Fri, 27 Sep 2019 15:40:39 +0900 Subject: [PATCH] General type updates --- baselines/dom.generated.d.ts | 62 ++++----- baselines/webworker.generated.d.ts | 20 ++- inputfiles/addedTypes.json | 4 + inputfiles/comments.json | 15 --- inputfiles/idl/Compatibility.widl | 4 +- inputfiles/idl/DOM.commentmap.json | 3 +- inputfiles/idl/DOM.widl | 120 ++++++++++++++---- inputfiles/idl/File.widl | 34 ++--- inputfiles/idl/HTML - DOM.widl | 22 +++- .../HTML - Form control infrastructure.widl | 10 ++ inputfiles/idl/HTML - Form elements.widl | 53 ++++---- inputfiles/idl/HTML - The input element.widl | 6 +- .../idl/HTML - Web application APIs.widl | 17 ++- inputfiles/idl/High Resolution Time.widl | 2 +- inputfiles/idl/Push.widl | 34 ++--- inputfiles/idl/Service Workers.widl | 29 +++-- inputfiles/idl/Web Audio.widl | 42 +++--- inputfiles/idlSources.json | 4 - inputfiles/removedTypes.json | 31 ++++- src/emitter.ts | 1 - src/widlprocess.ts | 23 +++- 21 files changed, 332 insertions(+), 204 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index cc5537b24..0afc86b8f 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -1674,6 +1674,13 @@ interface ShadowRootInit { mode: ShadowRootMode; } +interface StaticRangeInit { + endContainer: Node; + endOffset: number; + startContainer: Node; + startOffset: number; +} + interface StereoPannerOptions extends AudioNodeOptions { pan?: number; } @@ -2140,8 +2147,8 @@ interface AudioBuffer { readonly length: number; readonly numberOfChannels: number; readonly sampleRate: number; - copyFromChannel(destination: Float32Array, channelNumber: number, startInChannel?: number): void; - copyToChannel(source: Float32Array, channelNumber: number, startInChannel?: number): void; + copyFromChannel(destination: Float32Array, channelNumber: number, bufferOffset?: number): void; + copyToChannel(source: Float32Array, channelNumber: number, bufferOffset?: number): void; getChannelData(channel: number): Float32Array; } @@ -2509,7 +2516,10 @@ declare var BiquadFilterNode: { interface Blob { readonly size: number; readonly type: string; + arrayBuffer(): Promise; slice(start?: number, end?: number, contentType?: string): Blob; + stream(): ReadableStream; + text(): Promise; } declare var Blob: { @@ -3150,7 +3160,8 @@ interface CSSStyleDeclaration { webkitBoxFlex: string; /** @deprecated */ webkitBoxOrdinalGroup: string; - webkitBoxOrient: string | null; + /** @deprecated */ + webkitBoxOrient: string; /** @deprecated */ webkitBoxPack: string; /** @deprecated */ @@ -3817,7 +3828,7 @@ declare var CryptoKeyPair: { }; interface CustomElementRegistry { - define(name: string, constructor: Function, options?: ElementDefinitionOptions): void; + define(name: string, constructor: CustomElementConstructor, options?: ElementDefinitionOptions): void; get(name: string): any; upgrade(root: Node): void; whenDefined(name: string): Promise; @@ -4504,10 +4515,6 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * Sets or gets the URL for the current document. */ readonly URL: string; - /** - * Gets the object that has the focus when the parent document has focus. - */ - readonly activeElement: Element | null; /** * Sets or gets the color of all active links in the document. */ @@ -5508,7 +5515,7 @@ interface EventTarget { * * When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. * - * When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in §2.8 Observing event listeners. + * When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. * * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. * @@ -5813,7 +5820,6 @@ interface GlobalEventHandlersEventMap { "load": Event; "loadeddata": Event; "loadedmetadata": Event; - "loadend": ProgressEvent; "loadstart": Event; "lostpointercapture": PointerEvent; "mousedown": MouseEvent; @@ -5998,7 +6004,6 @@ interface GlobalEventHandlers { * @param ev The event. */ onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null; - onloadend: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null; /** * Occurs when Internet Explorer begins looking for media data. * @param ev The event. @@ -6420,10 +6425,6 @@ declare var HTMLBodyElement: { /** Provides properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating