From 121241a3ff62bcd47d3dd222e2cc7d4b123f4789 Mon Sep 17 00:00:00 2001 From: Jeffry Angtoni Date: Sun, 12 May 2019 22:46:05 +0700 Subject: [PATCH 01/17] chore: add system state and capabilities whatwg spec --- inputfiles/idlSources.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inputfiles/idlSources.json b/inputfiles/idlSources.json index a3d54b4b2..3d53004d7 100644 --- a/inputfiles/idlSources.json +++ b/inputfiles/idlSources.json @@ -514,5 +514,9 @@ { "url": "https://html.spec.whatwg.org/multipage/web-messaging.html", "title": "Web Messaging" + }, + { + "url": "https://html.spec.whatwg.org/multipage/system-state.html", + "title": "HTML - System state and capabilities" } ] From 8fecd20e6294eb997f1b81f29177feca6e5068f6 Mon Sep 17 00:00:00 2001 From: Jeffry Angtoni Date: Sun, 12 May 2019 22:48:31 +0700 Subject: [PATCH 02/17] feat(idl): add generated widl and commentmap file --- ...tem state and capabilities.commentmap.json | 12 +++ .../HTML - System state and capabilities.widl | 84 +++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 inputfiles/idl/HTML - System state and capabilities.commentmap.json create mode 100644 inputfiles/idl/HTML - System state and capabilities.widl diff --git a/inputfiles/idl/HTML - System state and capabilities.commentmap.json b/inputfiles/idl/HTML - System state and capabilities.commentmap.json new file mode 100644 index 000000000..c24fce6d4 --- /dev/null +++ b/inputfiles/idl/HTML - System state and capabilities.commentmap.json @@ -0,0 +1,12 @@ +{ + "navigator": "Returns the string \"Mozilla\".", + "plugin-name": "Returns the plugin's name.", + "plugin-description": "Returns the plugin's description.", + "plugin-filename": "Returns the plugin library's filename, if applicable on the current platform.", + "plugin-length": "Returns the number of MIME types, represented by MimeType objects, supported by the plugin.", + "plugin-item": "Returns the specified MimeType object.", + "mimetype-type": "Returns the MIME type.", + "mimetype-description": "Returns the MIME type's description.", + "mimetype-suffixes": "Returns the MIME type's typical file extensions, in a comma-separated list.", + "mimetype-enabledplugin": "Returns the Plugin object that implements this MIME type." +} diff --git a/inputfiles/idl/HTML - System state and capabilities.widl b/inputfiles/idl/HTML - System state and capabilities.widl new file mode 100644 index 000000000..13b6659a2 --- /dev/null +++ b/inputfiles/idl/HTML - System state and capabilities.widl @@ -0,0 +1,84 @@ +[Exposed=Window] +interface Navigator { + // objects implementing this interface also implement the interfaces given below +}; +Navigator includes NavigatorID; +Navigator includes NavigatorLanguage; +Navigator includes NavigatorOnLine; +Navigator includes NavigatorContentUtils; +Navigator includes NavigatorCookies; +Navigator includes NavigatorPlugins; +Navigator includes NavigatorConcurrentHardware; + +interface mixin NavigatorID { + readonly attribute DOMString appCodeName; // constant "Mozilla" + readonly attribute DOMString appName; // constant "Netscape" + readonly attribute DOMString appVersion; + readonly attribute DOMString platform; + readonly attribute DOMString product; // constant "Gecko" + [Exposed=Window] readonly attribute DOMString productSub; + readonly attribute DOMString userAgent; + [Exposed=Window] readonly attribute DOMString vendor; + [Exposed=Window] readonly attribute DOMString vendorSub; // constant "" +}; + +partial interface mixin NavigatorID { + [Exposed=Window] boolean taintEnabled(); // constant false + [Exposed=Window] readonly attribute DOMString oscpu; +}; + +interface mixin NavigatorLanguage { + readonly attribute DOMString language; + readonly attribute FrozenArray languages; +}; + +interface mixin NavigatorContentUtils { + void registerProtocolHandler(DOMString scheme, USVString url, DOMString title); + void unregisterProtocolHandler(DOMString scheme, USVString url); +}; + +interface mixin NavigatorCookies { + readonly attribute boolean cookieEnabled; +}; + +interface mixin NavigatorPlugins { + [SameObject] readonly attribute PluginArray plugins; + [SameObject] readonly attribute MimeTypeArray mimeTypes; + boolean javaEnabled(); +}; + +[Exposed=Window, + LegacyUnenumerableNamedProperties] +interface PluginArray { + void refresh(optional boolean reload = false); + readonly attribute unsigned long length; + getter Plugin? item(unsigned long index); + getter Plugin? namedItem(DOMString name); +}; + +[Exposed=Window, + LegacyUnenumerableNamedProperties] +interface MimeTypeArray { + readonly attribute unsigned long length; + getter MimeType? item(unsigned long index); + getter MimeType? namedItem(DOMString name); +}; + +[Exposed=Window, + LegacyUnenumerableNamedProperties] +interface Plugin { + readonly attribute DOMString name; + readonly attribute DOMString description; + readonly attribute DOMString filename; + readonly attribute unsigned long length; + getter MimeType? item(unsigned long index); + getter MimeType? namedItem(DOMString name); +}; + +[Exposed=Window] +interface MimeType { + readonly attribute DOMString type; + readonly attribute DOMString description; + readonly attribute DOMString suffixes; // comma-separated + readonly attribute Plugin enabledPlugin; +}; From cddf826626fe7946543992212cb449ceca6a8a79 Mon Sep 17 00:00:00 2001 From: Jeffry Angtoni Date: Sun, 12 May 2019 22:50:52 +0700 Subject: [PATCH 03/17] chore(baselines): add generated type --- baselines/dom.generated.d.ts | 120 +++++++++++--------------- baselines/dom.iterable.generated.d.ts | 2 +- baselines/webworker.generated.d.ts | 3 - 3 files changed, 50 insertions(+), 75 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index b60dd9b53..ded00b79a 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -241,10 +241,6 @@ interface ComputedKeyframe { [property: string]: string | number | null | undefined; } -interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation { - arrayOfDomainStrings?: string[]; -} - interface ConstantSourceOptions { offset?: number; } @@ -483,10 +479,6 @@ interface EventSourceInit { withCredentials?: boolean; } -interface ExceptionInformation { - domain?: string | null; -} - interface FilePropertyBag extends BlobPropertyBag { lastModified?: number; } @@ -1681,16 +1673,6 @@ interface StorageEventInit extends EventInit { url?: string; } -interface StoreExceptionsInformation extends ExceptionInformation { - detailURI?: string | null; - explanationString?: string | null; - siteName?: string | null; -} - -interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation { - arrayOfDomainStrings?: string[]; -} - interface TextDecodeOptions { stream?: boolean; } @@ -9978,11 +9960,6 @@ declare var MSFIDOSignatureAssertion: { new(): MSFIDOSignatureAssertion; }; -interface MSFileSaver { - msSaveBlob(blob: any, defaultName?: string): boolean; - msSaveOrOpenBlob(blob: any, defaultName?: string): boolean; -} - interface MSGesture { target: Element; addPointer(pointerId: number): void; @@ -10136,15 +10113,6 @@ declare var MSMediaKeys: { isTypeSupportedWithFeatures(keySystem: string, type?: string | null): string; }; -interface MSNavigatorDoNotTrack { - confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean; - confirmWebWideTrackingException(args: ExceptionInformation): boolean; - removeSiteSpecificTrackingException(args: ExceptionInformation): void; - removeWebWideTrackingException(args: ExceptionInformation): void; - storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void; - storeWebWideTrackingException(args: StoreExceptionsInformation): void; -} - interface MSPointerEvent extends MouseEvent { readonly currentPoint: any; readonly height: number; @@ -10631,9 +10599,21 @@ declare var MessagePort: { /** Provides contains information about a MIME type associated with a particular plugin. NavigatorPlugins.mimeTypes returns an array of this object. */ interface MimeType { + /** + * Returns the MIME type's description. + */ readonly description: string; + /** + * Returns the Plugin object that implements this MIME type. + */ readonly enabledPlugin: Plugin; + /** + * Returns the MIME type's typical file extensions, in a comma-separated list. + */ readonly suffixes: string; + /** + * Returns the MIME type. + */ readonly type: string; } @@ -10645,9 +10625,9 @@ declare var MimeType: { /** Returns an array of MimeType instances, each of which contains information about a supported browser plugins. This object is returned by NavigatorPlugins.mimeTypes. */ interface MimeTypeArray { readonly length: number; - item(index: number): Plugin; - namedItem(type: string): Plugin; - [index: number]: Plugin; + item(index: number): MimeType | null; + namedItem(name: string): MimeType | null; + [index: number]: MimeType; } declare var MimeTypeArray: { @@ -10805,31 +10785,19 @@ declare var NavigationPreloadManager: { }; /** The state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities. */ -interface Navigator extends NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, MSNavigatorDoNotTrack, MSFileSaver, NavigatorBeacon, NavigatorConcurrentHardware, NavigatorUserMedia, NavigatorLanguage, NavigatorStorage, NavigatorAutomationInformation { - readonly activeVRDisplays: ReadonlyArray; - readonly authentication: WebAuthentication; +interface Navigator extends NavigatorStorage, NavigatorAutomationInformation, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, NavigatorConcurrentHardware { readonly clipboard: Clipboard; readonly cookieEnabled: boolean; readonly credentials: CredentialsContainer; readonly doNotTrack: string | null; - gamepadInputEmulation: GamepadInputEmulationType; readonly geolocation: Geolocation; readonly maxTouchPoints: number; readonly mediaDevices: MediaDevices; - readonly mimeTypes: MimeTypeArray; - readonly msManipulationViewsEnabled: boolean; - readonly msMaxTouchPoints: number; - readonly msPointerEnabled: boolean; readonly permissions: Permissions; - readonly plugins: PluginArray; readonly pointerEnabled: boolean; readonly serviceWorker: ServiceWorkerContainer; - readonly webdriver: boolean; getGamepads(): (Gamepad | null)[]; getUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void; - getVRDisplays(): Promise; - javaEnabled(): boolean; - msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void; requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): Promise; vibrate(pattern: number | number[]): boolean; } @@ -10843,27 +10811,31 @@ interface NavigatorAutomationInformation { readonly webdriver: boolean; } -interface NavigatorBeacon { - sendBeacon(url: string, data?: Blob | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer | FormData | string | null): boolean; -} - interface NavigatorConcurrentHardware { readonly hardwareConcurrency: number; } interface NavigatorContentUtils { + registerProtocolHandler(scheme: string, url: string, title: string): void; + unregisterProtocolHandler(scheme: string, url: string): void; +} + +interface NavigatorCookies { + readonly cookieEnabled: boolean; } interface NavigatorID { readonly appCodeName: string; readonly appName: string; readonly appVersion: string; + readonly oscpu: string; readonly platform: string; readonly product: string; readonly productSub: string; readonly userAgent: string; readonly vendor: string; readonly vendorSub: string; + taintEnabled(): boolean; } interface NavigatorLanguage { @@ -10875,17 +10847,14 @@ interface NavigatorOnLine { readonly onLine: boolean; } -interface NavigatorStorage { - readonly storage: StorageManager; -} - -interface NavigatorStorageUtils { +interface NavigatorPlugins { + readonly mimeTypes: MimeTypeArray; + readonly plugins: PluginArray; + javaEnabled(): boolean; } -interface NavigatorUserMedia { - readonly mediaDevices: MediaDevices; - getDisplayMedia(constraints: MediaStreamConstraints): Promise; - getUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void; +interface NavigatorStorage { + readonly storage: StorageManager; } /** Node is an interface from which a number of DOM API object types inherit. It allows those types to be treated similarly; for example, inheriting the same set of methods, or being tested in the same way. */ @@ -11839,13 +11808,27 @@ declare var Permissions: { /** Provides information about a browser plugin. */ interface Plugin { + /** + * Returns the plugin's description. + */ readonly description: string; + /** + * Returns the plugin library's filename, if applicable on the current platform. + */ readonly filename: string; + /** + * Returns the number of MIME types, represented by MimeType objects, supported by the plugin. + */ readonly length: number; + /** + * Returns the plugin's name. + */ readonly name: string; - readonly version: string; - item(index: number): MimeType; - namedItem(type: string): MimeType; + /** + * Returns the specified MimeType object. + */ + item(index: number): MimeType | null; + namedItem(name: string): MimeType | null; [index: number]: MimeType; } @@ -11857,8 +11840,8 @@ declare var Plugin: { /** Used to store a list of Plugin objects describing the available plugins; it's returned by the window.navigator.plugins property. The PluginArray is not a JavaScript array, but has the length property and supports accessing individual items using bracket notation (plugins[2]), as well as via item(index) and namedItem("name") methods. */ interface PluginArray { readonly length: number; - item(index: number): Plugin; - namedItem(name: string): Plugin; + item(index: number): Plugin | null; + namedItem(name: string): Plugin | null; refresh(reload?: boolean): void; [index: number]: Plugin; } @@ -19153,10 +19136,6 @@ interface IntersectionObserverCallback { (entries: IntersectionObserverEntry[], observer: IntersectionObserver): void; } -interface MSLaunchUriCallback { - (): void; -} - interface MutationCallback { (mutations: MutationRecord[], observer: MutationObserver): void; } @@ -19986,7 +19965,6 @@ type FillMode = "none" | "forwards" | "backwards" | "both" | "auto"; type FullscreenNavigationUI = "auto" | "show" | "hide"; type GamepadHand = "" | "left" | "right"; type GamepadHapticActuatorType = "vibration"; -type GamepadInputEmulationType = "mouse" | "keyboard" | "gamepad"; type GamepadMappingType = "" | "standard"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; type IDBRequestReadyState = "pending" | "done"; diff --git a/baselines/dom.iterable.generated.d.ts b/baselines/dom.iterable.generated.d.ts index 1c7ad5e9b..070855ab7 100644 --- a/baselines/dom.iterable.generated.d.ts +++ b/baselines/dom.iterable.generated.d.ts @@ -134,7 +134,7 @@ interface MediaList { } interface MimeTypeArray { - [Symbol.iterator](): IterableIterator; + [Symbol.iterator](): IterableIterator; } interface NamedNodeMap { diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index f9d077650..58a705b3e 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -2312,10 +2312,7 @@ interface NavigatorID { readonly appVersion: string; readonly platform: string; readonly product: string; - readonly productSub: string; readonly userAgent: string; - readonly vendor: string; - readonly vendorSub: string; } interface NavigatorOnLine { From 479c74c7915b65b025598c7bcbfd932a58485808 Mon Sep 17 00:00:00 2001 From: Jeffry Angtoni Date: Fri, 14 Jun 2019 21:34:53 +0700 Subject: [PATCH 04/17] chore: update baseline --- baselines/dom.generated.d.ts | 1 - baselines/dom.iterable.generated.d.ts | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index ded00b79a..dd6cd23d8 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -10787,7 +10787,6 @@ declare var NavigationPreloadManager: { /** The state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities. */ interface Navigator extends NavigatorStorage, NavigatorAutomationInformation, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, NavigatorConcurrentHardware { readonly clipboard: Clipboard; - readonly cookieEnabled: boolean; readonly credentials: CredentialsContainer; readonly doNotTrack: string | null; readonly geolocation: Geolocation; diff --git a/baselines/dom.iterable.generated.d.ts b/baselines/dom.iterable.generated.d.ts index 070855ab7..f364cd9ef 100644 --- a/baselines/dom.iterable.generated.d.ts +++ b/baselines/dom.iterable.generated.d.ts @@ -273,8 +273,8 @@ interface WebAuthentication { } interface WebGL2RenderingContextBase { + uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; invalidateFramebuffer(target: GLenum, attachments: Iterable): void; - invalidateSubFramebuffer(target: GLenum, attachments: Iterable, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; uniform1uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniform2uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniform3uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; @@ -283,7 +283,7 @@ interface WebGL2RenderingContextBase { uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; - uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + invalidateSubFramebuffer(target: GLenum, attachments: Iterable, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; vertexAttribI4iv(index: GLuint, values: Iterable): void; vertexAttribI4uiv(index: GLuint, values: Iterable): void; @@ -297,12 +297,12 @@ interface WebGL2RenderingContextBase { } interface WebGL2RenderingContextOverloads { + uniform2iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniform1fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; - uniform2fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniform3fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniform4fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniform1iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; - uniform2iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniform3iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniform4iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; @@ -318,12 +318,12 @@ interface WebGLRenderingContextBase { } interface WebGLRenderingContextOverloads { + uniform2iv(location: WebGLUniformLocation | null, v: Iterable): void; uniform1fv(location: WebGLUniformLocation | null, v: Iterable): void; - uniform2fv(location: WebGLUniformLocation | null, v: Iterable): void; uniform3fv(location: WebGLUniformLocation | null, v: Iterable): void; uniform4fv(location: WebGLUniformLocation | null, v: Iterable): void; uniform1iv(location: WebGLUniformLocation | null, v: Iterable): void; - uniform2iv(location: WebGLUniformLocation | null, v: Iterable): void; + uniform2fv(location: WebGLUniformLocation | null, v: Iterable): void; uniform3iv(location: WebGLUniformLocation | null, v: Iterable): void; uniform4iv(location: WebGLUniformLocation | null, v: Iterable): void; uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable): void; From 9189f7826258e07d3c82ce350e586dcf43ff1ac8 Mon Sep 17 00:00:00 2001 From: Jeffry Angtoni Date: Fri, 14 Jun 2019 22:43:35 +0700 Subject: [PATCH 05/17] refactor(baseline): add removed ms-interfaces --- baselines/dom.generated.d.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index dd6cd23d8..0c98be7af 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -9960,6 +9960,11 @@ declare var MSFIDOSignatureAssertion: { new(): MSFIDOSignatureAssertion; }; +interface MSFileSaver { + msSaveBlob(blob: any, defaultName?: string): boolean; + msSaveOrOpenBlob(blob: any, defaultName?: string): boolean; +} + interface MSGesture { target: Element; addPointer(pointerId: number): void; @@ -10113,6 +10118,15 @@ declare var MSMediaKeys: { isTypeSupportedWithFeatures(keySystem: string, type?: string | null): string; }; +interface MSNavigatorDoNotTrack { + confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean; + confirmWebWideTrackingException(args: ExceptionInformation): boolean; + removeSiteSpecificTrackingException(args: ExceptionInformation): void; + removeWebWideTrackingException(args: ExceptionInformation): void; + storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void; + storeWebWideTrackingException(args: StoreExceptionsInformation): void; +} + interface MSPointerEvent extends MouseEvent { readonly currentPoint: any; readonly height: number; @@ -10785,7 +10799,7 @@ declare var NavigationPreloadManager: { }; /** The state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities. */ -interface Navigator extends NavigatorStorage, NavigatorAutomationInformation, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, NavigatorConcurrentHardware { +interface Navigator extends MSFileSaver, MSNavigatorDoNotTrack, NavigatorStorage, NavigatorAutomationInformation, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, NavigatorConcurrentHardware { readonly clipboard: Clipboard; readonly credentials: CredentialsContainer; readonly doNotTrack: string | null; From a3b0d1ef4d8391969cb187131be1687322825d1b Mon Sep 17 00:00:00 2001 From: Jeffry Angtoni Date: Sat, 15 Jun 2019 11:55:34 +0700 Subject: [PATCH 06/17] refactor(idlSources): sort idlsource --- inputfiles/idlSources.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inputfiles/idlSources.json b/inputfiles/idlSources.json index 3d53004d7..4b4cadfad 100644 --- a/inputfiles/idlSources.json +++ b/inputfiles/idlSources.json @@ -226,6 +226,10 @@ "url": "https://html.spec.whatwg.org/multipage/history.html", "title": "HTML - Session history and navigation" }, + { + "url": "https://html.spec.whatwg.org/multipage/system-state.html", + "title": "HTML - System state and capabilities" + }, { "url": "https://html.spec.whatwg.org/multipage/tables.html", "title": "HTML - Tabular data" @@ -514,9 +518,5 @@ { "url": "https://html.spec.whatwg.org/multipage/web-messaging.html", "title": "Web Messaging" - }, - { - "url": "https://html.spec.whatwg.org/multipage/system-state.html", - "title": "HTML - System state and capabilities" } ] From 569dd99483553dfb84dda88a4aecf50b7485101e Mon Sep 17 00:00:00 2001 From: Jeffry Angtoni Date: Sat, 15 Jun 2019 13:10:14 +0700 Subject: [PATCH 07/17] refactor(addedTypes): add missing interfaces and MS-specific interfaces --- inputfiles/addedTypes.json | 144 +++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) diff --git a/inputfiles/addedTypes.json b/inputfiles/addedTypes.json index a5c1cf6f5..e0b7f0fa3 100644 --- a/inputfiles/addedTypes.json +++ b/inputfiles/addedTypes.json @@ -2207,6 +2207,150 @@ } } } + }, + "MSFileSaver": { + "name": "MSFileSaver", + "methods": { + "method": { + "msSaveBlob": { + "name": "msSaveBlob", + "override-signatures": [ + "msSaveBlob(blob: any, defaultName?: string): boolean" + ] + }, + "msSaveOrOpenBlob": { + "name": "msSaveOrOpenBlob", + "override-signatures": [ + "msSaveOrOpenBlob(blob: any, defaultName?: string): boolean" + ] + } + } + }, + "no-interface-object": 1 + }, + "MSLaunchUriCallback": { + "name": "MSLaunchUriCallback", + "methods": { + "method": { + "()": { + "name": "", + "override-signatures": [ + "(): void" + ] + } + } + }, + "no-interface-object": 1 + }, + "MSNavigatorDoNotTrack": { + "name": "MSNavigatorDoNotTrack", + "methods": { + "method": { + "confirmSiteSpecificTrackingException": { + "name": "confirmSiteSpecificTrackingException", + "override-signatures": [ + "confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean" + ] + }, + "confirmWebWideTrackingException": { + "name": "confirmWebWideTrackingException", + "override-signatures": [ + "confirmWebWideTrackingException(args: ExceptionInformation): boolean" + ] + }, + "removeSiteSpecificTrackingException": { + "name": "removeSiteSpecificTrackingException", + "override-signatures": [ + "removeSiteSpecificTrackingException(args: ExceptionInformation): void" + ] + }, + "removeWebWideTrackingException": { + "name": "removeWebWideTrackingException", + "override-signatures": [ + "removeWebWideTrackingException(args: ExceptionInformation): void" + ] + }, + "storeSiteSpecificTrackingException": { + "name": "storeSiteSpecificTrackingException", + "override-signatures": [ + "storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void" + ] + }, + "storeWebWideTrackingException": { + "name": "storeWebWideTrackingException", + "override-signatures": [ + "storeWebWideTrackingException(args: StoreExceptionsInformation): void" + ] + } + } + }, + "no-interface-object": 1 + }, + "ExceptionInformation": { + "name": "ExceptionInformation", + "properties": { + "property": { + "domain": { + "name": "domain", + "required": 0, + "override-type": "string | null" + } + + } + }, + "no-interface-object": 1 + }, + "ConfirmSiteSpecificExceptionsInformation": { + "name": "ConfirmSiteSpecificExceptionsInformation", + "extends": "ExceptionInformation", + "properties": { + "property": { + "arrayOfDomainStrings": { + "name": "arrayOfDomainStrings", + "required": 0, + "override-type": "string[]" + } + } + }, + "no-interface-object": 1 + }, + "StoreExceptionsInformation": { + "name": "StoreExceptionsInformation", + "extends": "ExceptionInformation", + "properties": { + "property": { + "detailURI": { + "name": "detailURI", + "required": 0, + "override-type": "string | null" + }, + "explanationString": { + "name": "explanationString", + "required": 0, + "override-type": "string | null" + }, + "siteName": { + "name": "siteName", + "required": 0, + "override-type": "string | null" + } + } + }, + "no-interface-object": 1 + }, + "StoreSiteSpecificExceptionsInformation": { + "name": "StoreSiteSpecificExceptionsInformation", + "extends": "StoreExceptionsInformation", + "properties": { + "property": { + "arrayOfDomainStrings": { + "name": "arrayOfDomainStrings", + "required": 0, + "override-type": "string[]" + } + } + }, + "no-interface-object": 1 } } }, From 5c8e19e030788c388fa17af3bc676c547b318ca0 Mon Sep 17 00:00:00 2001 From: Jeffry Angtoni Date: Sat, 15 Jun 2019 13:10:50 +0700 Subject: [PATCH 08/17] refactor(overridingTypes): override navigator interface --- inputfiles/overridingTypes.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/inputfiles/overridingTypes.json b/inputfiles/overridingTypes.json index edd301543..fb8869af8 100644 --- a/inputfiles/overridingTypes.json +++ b/inputfiles/overridingTypes.json @@ -2740,6 +2740,22 @@ } } } + }, + "Navigator": { + "implements": [ + "MSFileSaver", + "MSNavigatorDoNotTrack" + ], + "methods": { + "method": { + "msLaunchUri": { + "name": "msLaunchUri", + "override-signatures": [ + "msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void" + ] + } + } + } } } }, From 21c1c0ee4652e83ae362666d1805f921d24c334b Mon Sep 17 00:00:00 2001 From: Jeffry Angtoni Date: Sat, 15 Jun 2019 13:18:53 +0700 Subject: [PATCH 09/17] refactor(overridingTypes): add missing ms-specific properties in Navigator interface --- inputfiles/overridingTypes.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/inputfiles/overridingTypes.json b/inputfiles/overridingTypes.json index fb8869af8..80580ddfd 100644 --- a/inputfiles/overridingTypes.json +++ b/inputfiles/overridingTypes.json @@ -2755,6 +2755,25 @@ ] } } + }, + "properties": { + "property": { + "msManipulationViewsEnabled": { + "name": "msManipulationViewsEnabled", + "override-type": "boolean", + "read-only": 1 + }, + "msMaxTouchPoints": { + "name": "msMaxTouchPoints", + "override-type": "number", + "read-only": 1 + }, + "msPointerEnabled": { + "name": "msPointerEnabled", + "override-type": "boolean", + "read-only": 1 + } + } } } } From e61b35f3cd7e976e71fe35b0d1df42ea3e98831a Mon Sep 17 00:00:00 2001 From: Jeffry Angtoni Date: Sat, 15 Jun 2019 13:20:13 +0700 Subject: [PATCH 10/17] chore: update baselines --- baselines/dom.generated.d.ts | 28 ++++++++++++++++++++++- baselines/webworker.generated.d.ts | 36 ++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 0c98be7af..29bfaa9e0 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -3616,6 +3616,10 @@ interface ConcatParams extends Algorithm { publicInfo?: Uint8Array; } +interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation { + arrayOfDomainStrings?: string[]; +} + /** Provides access to the browser's debugging console (e.g. the Web Console in Firefox). The specifics of how it works varies from browser to browser, but there is a de facto set of features that are typically provided. */ interface Console { memory: any; @@ -5462,6 +5466,10 @@ declare var EventTarget: { new(): EventTarget; }; +interface ExceptionInformation { + domain?: string | null; +} + interface ExtensionScriptApis { extensionIdToShortId(extensionId: string): number; fireExtensionApiTelemetry(functionName: string, isSucceeded: boolean, isSupported: boolean, errorString: string): void; @@ -10052,6 +10060,10 @@ declare var MSInputMethodContext: { new(): MSInputMethodContext; }; +interface MSLaunchUriCallback { + (): void; +} + interface MSMediaKeyError { readonly code: number; readonly systemCode: number; @@ -10799,18 +10811,22 @@ declare var NavigationPreloadManager: { }; /** The state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities. */ -interface Navigator extends MSFileSaver, MSNavigatorDoNotTrack, NavigatorStorage, NavigatorAutomationInformation, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, NavigatorConcurrentHardware { +interface Navigator extends NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, NavigatorConcurrentHardware, NavigatorStorage, NavigatorAutomationInformation, MSFileSaver, MSNavigatorDoNotTrack { readonly clipboard: Clipboard; readonly credentials: CredentialsContainer; readonly doNotTrack: string | null; readonly geolocation: Geolocation; readonly maxTouchPoints: number; readonly mediaDevices: MediaDevices; + readonly msManipulationViewsEnabled: boolean; + readonly msMaxTouchPoints: number; + readonly msPointerEnabled: boolean; readonly permissions: Permissions; readonly pointerEnabled: boolean; readonly serviceWorker: ServiceWorkerContainer; getGamepads(): (Gamepad | null)[]; getUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void; + msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void; requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): Promise; vibrate(pattern: number | number[]): boolean; } @@ -15464,6 +15480,16 @@ declare var StorageManager: { new(): StorageManager; }; +interface StoreExceptionsInformation extends ExceptionInformation { + detailURI?: string | null; + explanationString?: string | null; + siteName?: string | null; +} + +interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation { + arrayOfDomainStrings?: string[]; +} + interface StyleMedia { readonly type: string; matchMedium(mediaquery: string): boolean; diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index 58a705b3e..74085fcdf 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -904,6 +904,10 @@ interface ConcatParams extends Algorithm { publicInfo?: Uint8Array; } +interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation { + arrayOfDomainStrings?: string[]; +} + /** Provides access to the browser's debugging console (e.g. the Web Console in Firefox). The specifics of how it works varies from browser to browser, but there is a de facto set of features that are typically provided. */ interface Console { memory: any; @@ -1477,6 +1481,10 @@ declare var EventTarget: { new(): EventTarget; }; +interface ExceptionInformation { + domain?: string | null; +} + /** Extends the lifetime of the install and activate events dispatched on the global scope as part of the service worker lifecycle. This ensures that any functional events (like FetchEvent) are not dispatched until it upgrades database schemas and deletes the outdated cache entries. */ interface ExtendableEvent extends Event { waitUntil(f: any): void; @@ -2205,6 +2213,24 @@ declare var ImageData: { new(array: Uint8ClampedArray, width: number, height: number): ImageData; }; +interface MSFileSaver { + msSaveBlob(blob: any, defaultName?: string): boolean; + msSaveOrOpenBlob(blob: any, defaultName?: string): boolean; +} + +interface MSLaunchUriCallback { + (): void; +} + +interface MSNavigatorDoNotTrack { + confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean; + confirmWebWideTrackingException(args: ExceptionInformation): boolean; + removeSiteSpecificTrackingException(args: ExceptionInformation): void; + removeWebWideTrackingException(args: ExceptionInformation): void; + storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void; + storeWebWideTrackingException(args: StoreExceptionsInformation): void; +} + /** This Channel Messaging API interface allows us to create a new message channel and send data through it via its two MessagePort properties. */ interface MessageChannel { /** @@ -2995,6 +3021,16 @@ declare var StorageManager: { new(): StorageManager; }; +interface StoreExceptionsInformation extends ExceptionInformation { + detailURI?: string | null; + explanationString?: string | null; + siteName?: string | null; +} + +interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation { + arrayOfDomainStrings?: string[]; +} + /** This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto). */ interface SubtleCrypto { decrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike; From 25ece2beb09e2663588d5493ce613d62c6fe8a1d Mon Sep 17 00:00:00 2001 From: Jeffry Angtoni Date: Sat, 15 Jun 2019 14:04:18 +0700 Subject: [PATCH 11/17] refactor(addedTypes): remove redundant interfaces --- inputfiles/addedTypes.json | 130 ------------------------------------- 1 file changed, 130 deletions(-) diff --git a/inputfiles/addedTypes.json b/inputfiles/addedTypes.json index e0b7f0fa3..58453b125 100644 --- a/inputfiles/addedTypes.json +++ b/inputfiles/addedTypes.json @@ -2208,26 +2208,6 @@ } } }, - "MSFileSaver": { - "name": "MSFileSaver", - "methods": { - "method": { - "msSaveBlob": { - "name": "msSaveBlob", - "override-signatures": [ - "msSaveBlob(blob: any, defaultName?: string): boolean" - ] - }, - "msSaveOrOpenBlob": { - "name": "msSaveOrOpenBlob", - "override-signatures": [ - "msSaveOrOpenBlob(blob: any, defaultName?: string): boolean" - ] - } - } - }, - "no-interface-object": 1 - }, "MSLaunchUriCallback": { "name": "MSLaunchUriCallback", "methods": { @@ -2241,116 +2221,6 @@ } }, "no-interface-object": 1 - }, - "MSNavigatorDoNotTrack": { - "name": "MSNavigatorDoNotTrack", - "methods": { - "method": { - "confirmSiteSpecificTrackingException": { - "name": "confirmSiteSpecificTrackingException", - "override-signatures": [ - "confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean" - ] - }, - "confirmWebWideTrackingException": { - "name": "confirmWebWideTrackingException", - "override-signatures": [ - "confirmWebWideTrackingException(args: ExceptionInformation): boolean" - ] - }, - "removeSiteSpecificTrackingException": { - "name": "removeSiteSpecificTrackingException", - "override-signatures": [ - "removeSiteSpecificTrackingException(args: ExceptionInformation): void" - ] - }, - "removeWebWideTrackingException": { - "name": "removeWebWideTrackingException", - "override-signatures": [ - "removeWebWideTrackingException(args: ExceptionInformation): void" - ] - }, - "storeSiteSpecificTrackingException": { - "name": "storeSiteSpecificTrackingException", - "override-signatures": [ - "storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void" - ] - }, - "storeWebWideTrackingException": { - "name": "storeWebWideTrackingException", - "override-signatures": [ - "storeWebWideTrackingException(args: StoreExceptionsInformation): void" - ] - } - } - }, - "no-interface-object": 1 - }, - "ExceptionInformation": { - "name": "ExceptionInformation", - "properties": { - "property": { - "domain": { - "name": "domain", - "required": 0, - "override-type": "string | null" - } - - } - }, - "no-interface-object": 1 - }, - "ConfirmSiteSpecificExceptionsInformation": { - "name": "ConfirmSiteSpecificExceptionsInformation", - "extends": "ExceptionInformation", - "properties": { - "property": { - "arrayOfDomainStrings": { - "name": "arrayOfDomainStrings", - "required": 0, - "override-type": "string[]" - } - } - }, - "no-interface-object": 1 - }, - "StoreExceptionsInformation": { - "name": "StoreExceptionsInformation", - "extends": "ExceptionInformation", - "properties": { - "property": { - "detailURI": { - "name": "detailURI", - "required": 0, - "override-type": "string | null" - }, - "explanationString": { - "name": "explanationString", - "required": 0, - "override-type": "string | null" - }, - "siteName": { - "name": "siteName", - "required": 0, - "override-type": "string | null" - } - } - }, - "no-interface-object": 1 - }, - "StoreSiteSpecificExceptionsInformation": { - "name": "StoreSiteSpecificExceptionsInformation", - "extends": "StoreExceptionsInformation", - "properties": { - "property": { - "arrayOfDomainStrings": { - "name": "arrayOfDomainStrings", - "required": 0, - "override-type": "string[]" - } - } - }, - "no-interface-object": 1 } } }, From cfcded83a061f20bd04c5273cff17ba85f832b90 Mon Sep 17 00:00:00 2001 From: Jeffry Angtoni Date: Sat, 15 Jun 2019 14:06:06 +0700 Subject: [PATCH 12/17] chore: update baselines #2 --- baselines/dom.generated.d.ts | 36 +++++++++++++++--------------- baselines/webworker.generated.d.ts | 32 -------------------------- 2 files changed, 18 insertions(+), 50 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 29bfaa9e0..b71f5233f 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -241,6 +241,10 @@ interface ComputedKeyframe { [property: string]: string | number | null | undefined; } +interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation { + arrayOfDomainStrings?: string[]; +} + interface ConstantSourceOptions { offset?: number; } @@ -479,6 +483,10 @@ interface EventSourceInit { withCredentials?: boolean; } +interface ExceptionInformation { + domain?: string | null; +} + interface FilePropertyBag extends BlobPropertyBag { lastModified?: number; } @@ -1673,6 +1681,16 @@ interface StorageEventInit extends EventInit { url?: string; } +interface StoreExceptionsInformation extends ExceptionInformation { + detailURI?: string | null; + explanationString?: string | null; + siteName?: string | null; +} + +interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation { + arrayOfDomainStrings?: string[]; +} + interface TextDecodeOptions { stream?: boolean; } @@ -3616,10 +3634,6 @@ interface ConcatParams extends Algorithm { publicInfo?: Uint8Array; } -interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation { - arrayOfDomainStrings?: string[]; -} - /** Provides access to the browser's debugging console (e.g. the Web Console in Firefox). The specifics of how it works varies from browser to browser, but there is a de facto set of features that are typically provided. */ interface Console { memory: any; @@ -5466,10 +5480,6 @@ declare var EventTarget: { new(): EventTarget; }; -interface ExceptionInformation { - domain?: string | null; -} - interface ExtensionScriptApis { extensionIdToShortId(extensionId: string): number; fireExtensionApiTelemetry(functionName: string, isSucceeded: boolean, isSupported: boolean, errorString: string): void; @@ -15480,16 +15490,6 @@ declare var StorageManager: { new(): StorageManager; }; -interface StoreExceptionsInformation extends ExceptionInformation { - detailURI?: string | null; - explanationString?: string | null; - siteName?: string | null; -} - -interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation { - arrayOfDomainStrings?: string[]; -} - interface StyleMedia { readonly type: string; matchMedium(mediaquery: string): boolean; diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index 74085fcdf..1209e86f5 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -904,10 +904,6 @@ interface ConcatParams extends Algorithm { publicInfo?: Uint8Array; } -interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation { - arrayOfDomainStrings?: string[]; -} - /** Provides access to the browser's debugging console (e.g. the Web Console in Firefox). The specifics of how it works varies from browser to browser, but there is a de facto set of features that are typically provided. */ interface Console { memory: any; @@ -1481,10 +1477,6 @@ declare var EventTarget: { new(): EventTarget; }; -interface ExceptionInformation { - domain?: string | null; -} - /** Extends the lifetime of the install and activate events dispatched on the global scope as part of the service worker lifecycle. This ensures that any functional events (like FetchEvent) are not dispatched until it upgrades database schemas and deletes the outdated cache entries. */ interface ExtendableEvent extends Event { waitUntil(f: any): void; @@ -2213,24 +2205,10 @@ declare var ImageData: { new(array: Uint8ClampedArray, width: number, height: number): ImageData; }; -interface MSFileSaver { - msSaveBlob(blob: any, defaultName?: string): boolean; - msSaveOrOpenBlob(blob: any, defaultName?: string): boolean; -} - interface MSLaunchUriCallback { (): void; } -interface MSNavigatorDoNotTrack { - confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean; - confirmWebWideTrackingException(args: ExceptionInformation): boolean; - removeSiteSpecificTrackingException(args: ExceptionInformation): void; - removeWebWideTrackingException(args: ExceptionInformation): void; - storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void; - storeWebWideTrackingException(args: StoreExceptionsInformation): void; -} - /** This Channel Messaging API interface allows us to create a new message channel and send data through it via its two MessagePort properties. */ interface MessageChannel { /** @@ -3021,16 +2999,6 @@ declare var StorageManager: { new(): StorageManager; }; -interface StoreExceptionsInformation extends ExceptionInformation { - detailURI?: string | null; - explanationString?: string | null; - siteName?: string | null; -} - -interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation { - arrayOfDomainStrings?: string[]; -} - /** This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto). */ interface SubtleCrypto { decrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike; From d0bf8e60efacb471a7802ad82df1b091f2df2b1b Mon Sep 17 00:00:00 2001 From: Jeffry Angtoni Date: Sat, 15 Jun 2019 14:30:55 +0700 Subject: [PATCH 13/17] refactor(addedTypes): remove MSLaunchUriCallback interface --- inputfiles/addedTypes.json | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/inputfiles/addedTypes.json b/inputfiles/addedTypes.json index 58453b125..a5c1cf6f5 100644 --- a/inputfiles/addedTypes.json +++ b/inputfiles/addedTypes.json @@ -2207,20 +2207,6 @@ } } } - }, - "MSLaunchUriCallback": { - "name": "MSLaunchUriCallback", - "methods": { - "method": { - "()": { - "name": "", - "override-signatures": [ - "(): void" - ] - } - } - }, - "no-interface-object": 1 } } }, From 87875b37a48be22cfa732fe86bb07778dd63c219 Mon Sep 17 00:00:00 2001 From: Jeffry Angtoni Date: Sat, 15 Jun 2019 14:31:33 +0700 Subject: [PATCH 14/17] refactor(knownTypes): add MSLaunchUriCallback inside Window field --- inputfiles/knownTypes.json | 1 + 1 file changed, 1 insertion(+) diff --git a/inputfiles/knownTypes.json b/inputfiles/knownTypes.json index a8aedf6d1..825f81105 100644 --- a/inputfiles/knownTypes.json +++ b/inputfiles/knownTypes.json @@ -44,6 +44,7 @@ "KeyUsage", "Keyframe", "MidiPermissionDescriptor", + "MSLaunchUriCallback", "MutationRecordType", "NamedCurve", "Pbkdf2Params", From 09e00f130c8e404a16ad9b3a25a9f3ac87a9cdc4 Mon Sep 17 00:00:00 2001 From: Jeffry Angtoni Date: Sat, 15 Jun 2019 14:32:41 +0700 Subject: [PATCH 15/17] chore: update baselines #3 (with node 12) --- baselines/dom.generated.d.ts | 8 ++++---- baselines/dom.iterable.generated.d.ts | 12 ++++++------ baselines/webworker.generated.d.ts | 4 ---- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index b71f5233f..56509088d 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -10070,10 +10070,6 @@ declare var MSInputMethodContext: { new(): MSInputMethodContext; }; -interface MSLaunchUriCallback { - (): void; -} - interface MSMediaKeyError { readonly code: number; readonly systemCode: number; @@ -19175,6 +19171,10 @@ interface IntersectionObserverCallback { (entries: IntersectionObserverEntry[], observer: IntersectionObserver): void; } +interface MSLaunchUriCallback { + (): void; +} + interface MutationCallback { (mutations: MutationRecord[], observer: MutationObserver): void; } diff --git a/baselines/dom.iterable.generated.d.ts b/baselines/dom.iterable.generated.d.ts index f364cd9ef..070855ab7 100644 --- a/baselines/dom.iterable.generated.d.ts +++ b/baselines/dom.iterable.generated.d.ts @@ -273,8 +273,8 @@ interface WebAuthentication { } interface WebGL2RenderingContextBase { - uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; invalidateFramebuffer(target: GLenum, attachments: Iterable): void; + invalidateSubFramebuffer(target: GLenum, attachments: Iterable, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; uniform1uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniform2uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniform3uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; @@ -283,7 +283,7 @@ interface WebGL2RenderingContextBase { uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; - invalidateSubFramebuffer(target: GLenum, attachments: Iterable, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; + uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; vertexAttribI4iv(index: GLuint, values: Iterable): void; vertexAttribI4uiv(index: GLuint, values: Iterable): void; @@ -297,12 +297,12 @@ interface WebGL2RenderingContextBase { } interface WebGL2RenderingContextOverloads { - uniform2iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniform1fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniform3fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniform4fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniform1iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; - uniform2fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniform3iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniform4iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; @@ -318,12 +318,12 @@ interface WebGLRenderingContextBase { } interface WebGLRenderingContextOverloads { - uniform2iv(location: WebGLUniformLocation | null, v: Iterable): void; uniform1fv(location: WebGLUniformLocation | null, v: Iterable): void; + uniform2fv(location: WebGLUniformLocation | null, v: Iterable): void; uniform3fv(location: WebGLUniformLocation | null, v: Iterable): void; uniform4fv(location: WebGLUniformLocation | null, v: Iterable): void; uniform1iv(location: WebGLUniformLocation | null, v: Iterable): void; - uniform2fv(location: WebGLUniformLocation | null, v: Iterable): void; + uniform2iv(location: WebGLUniformLocation | null, v: Iterable): void; uniform3iv(location: WebGLUniformLocation | null, v: Iterable): void; uniform4iv(location: WebGLUniformLocation | null, v: Iterable): void; uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable): void; diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index 1209e86f5..58a705b3e 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -2205,10 +2205,6 @@ declare var ImageData: { new(array: Uint8ClampedArray, width: number, height: number): ImageData; }; -interface MSLaunchUriCallback { - (): void; -} - /** This Channel Messaging API interface allows us to create a new message channel and send data through it via its two MessagePort properties. */ interface MessageChannel { /** From ca26d7ad492b1f4d3dcc603b452bd697406c8880 Mon Sep 17 00:00:00 2001 From: Jeffry Angtoni Date: Sat, 15 Jun 2019 14:48:37 +0700 Subject: [PATCH 16/17] refactor(overridingTypes): restore NavigatorBeacon, activeVRDisplays, and getVRDisplays --- inputfiles/overridingTypes.json | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/inputfiles/overridingTypes.json b/inputfiles/overridingTypes.json index 80580ddfd..c084f105e 100644 --- a/inputfiles/overridingTypes.json +++ b/inputfiles/overridingTypes.json @@ -2744,10 +2744,17 @@ "Navigator": { "implements": [ "MSFileSaver", - "MSNavigatorDoNotTrack" + "MSNavigatorDoNotTrack", + "NavigatorBeacon" ], "methods": { "method": { + "getVRDisplays": { + "name": "getVRDisplays", + "override-signatures": [ + "getVRDisplays(): Promise" + ] + }, "msLaunchUri": { "name": "msLaunchUri", "override-signatures": [ @@ -2758,6 +2765,11 @@ }, "properties": { "property": { + "activeVRDisplays": { + "name": "activeVRDisplays", + "override-type": "ReadonlyArray", + "read-only": 1 + }, "msManipulationViewsEnabled": { "name": "msManipulationViewsEnabled", "override-type": "boolean", From 63840715127373d2ca2b53b6a30b3baebf9e4dde Mon Sep 17 00:00:00 2001 From: Jeffry Angtoni Date: Sat, 15 Jun 2019 14:49:11 +0700 Subject: [PATCH 17/17] chore: update baselines #4 --- baselines/dom.generated.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 56509088d..3209a8447 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -10817,7 +10817,8 @@ declare var NavigationPreloadManager: { }; /** The state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities. */ -interface Navigator extends NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, NavigatorConcurrentHardware, NavigatorStorage, NavigatorAutomationInformation, MSFileSaver, MSNavigatorDoNotTrack { +interface Navigator extends NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, NavigatorConcurrentHardware, NavigatorStorage, NavigatorAutomationInformation, MSFileSaver, MSNavigatorDoNotTrack, NavigatorBeacon { + readonly activeVRDisplays: ReadonlyArray; readonly clipboard: Clipboard; readonly credentials: CredentialsContainer; readonly doNotTrack: string | null; @@ -10832,6 +10833,7 @@ interface Navigator extends NavigatorID, NavigatorLanguage, NavigatorOnLine, Nav readonly serviceWorker: ServiceWorkerContainer; getGamepads(): (Gamepad | null)[]; getUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void; + getVRDisplays(): Promise; msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void; requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): Promise; vibrate(pattern: number | number[]): boolean; @@ -10846,6 +10848,10 @@ interface NavigatorAutomationInformation { readonly webdriver: boolean; } +interface NavigatorBeacon { + sendBeacon(url: string, data?: Blob | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer | FormData | string | null): boolean; +} + interface NavigatorConcurrentHardware { readonly hardwareConcurrency: number; }