diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index b60dd9b53..3209a8447 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -10631,9 +10631,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 +10657,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,30 +10817,23 @@ 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 { +interface Navigator extends NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, NavigatorConcurrentHardware, NavigatorStorage, NavigatorAutomationInformation, MSFileSaver, MSNavigatorDoNotTrack, NavigatorBeacon { readonly activeVRDisplays: ReadonlyArray; - readonly authentication: WebAuthentication; 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; @@ -10852,18 +10857,26 @@ interface NavigatorConcurrentHardware { } 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 +10888,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 +11849,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 +11881,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; } @@ -19986,7 +20010,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 { 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; +}; diff --git a/inputfiles/idlSources.json b/inputfiles/idlSources.json index a3d54b4b2..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" 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", diff --git a/inputfiles/overridingTypes.json b/inputfiles/overridingTypes.json index edd301543..c084f105e 100644 --- a/inputfiles/overridingTypes.json +++ b/inputfiles/overridingTypes.json @@ -2740,6 +2740,53 @@ } } } + }, + "Navigator": { + "implements": [ + "MSFileSaver", + "MSNavigatorDoNotTrack", + "NavigatorBeacon" + ], + "methods": { + "method": { + "getVRDisplays": { + "name": "getVRDisplays", + "override-signatures": [ + "getVRDisplays(): Promise" + ] + }, + "msLaunchUri": { + "name": "msLaunchUri", + "override-signatures": [ + "msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void" + ] + } + } + }, + "properties": { + "property": { + "activeVRDisplays": { + "name": "activeVRDisplays", + "override-type": "ReadonlyArray", + "read-only": 1 + }, + "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 + } + } + } } } },