diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index ea1015b38..cb8926f8c 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -10898,6 +10898,7 @@ interface Navigator extends MSFileSaver, MSNavigatorDoNotTrack, NavigatorAutomat getVRDisplays(): Promise; msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void; requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): Promise; + sendBeacon(url: string, data?: BodyInit | null): boolean; vibrate(pattern: number | number[]): boolean; } @@ -15169,6 +15170,22 @@ declare var ShadowRoot: { new(): ShadowRoot; }; +interface SharedWorker extends EventTarget, AbstractWorker { + /** + * Returns sharedWorker's MessagePort object which can be used to communicate with the global environment. + */ + readonly port: MessagePort; + addEventListener(type: K, listener: (this: SharedWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: SharedWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var SharedWorker: { + prototype: SharedWorker; + new(scriptURL: string, options?: string | WorkerOptions): SharedWorker; +}; + interface Slotable { readonly assignedSlot: HTMLSlotElement | null; } @@ -18582,7 +18599,6 @@ interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandler readonly history: History; readonly innerHeight: number; readonly innerWidth: number; - readonly isSecureContext: boolean; readonly length: number; location: Location; readonly locationbar: BarProp; @@ -18749,6 +18765,7 @@ interface WindowOrWorkerGlobalScope { readonly caches: CacheStorage; readonly crypto: Crypto; readonly indexedDB: IDBFactory; + readonly isSecureContext: boolean; readonly origin: string; readonly performance: Performance; atob(data: string): string; @@ -18769,13 +18786,21 @@ interface WindowSessionStorage { interface WorkerEventMap extends AbstractWorkerEventMap { "message": MessageEvent; + "messageerror": MessageEvent; } /** This Web Workers API interface represents a background task that can be easily created and can send messages back to its creator. Creating a worker is as simple as calling the Worker() constructor and specifying a script to be run in the worker thread. */ interface Worker extends EventTarget, AbstractWorker { onmessage: ((this: Worker, ev: MessageEvent) => any) | null; + onmessageerror: ((this: Worker, ev: MessageEvent) => any) | null; + /** + * Clones message and transmits it to worker's global environment. transfer can be passed as a list of objects that are to be transferred rather than cloned. + */ postMessage(message: any, transfer: Transferable[]): void; postMessage(message: any, options?: PostMessageOptions): void; + /** + * Aborts worker's associated global environment. + */ terminate(): void; addEventListener(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -19572,7 +19597,6 @@ declare var frames: Window; declare var history: History; declare var innerHeight: number; declare var innerWidth: number; -declare var isSecureContext: boolean; declare var length: number; declare var location: Location; declare var locationbar: BarProp; @@ -19951,6 +19975,7 @@ declare function requestAnimationFrame(callback: FrameRequestCallback): number; declare var caches: CacheStorage; declare var crypto: Crypto; declare var indexedDB: IDBFactory; +declare var isSecureContext: boolean; declare var origin: string; declare var performance: Performance; declare function atob(data: string): string; diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index 8f1f9071a..4337f4a33 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -1264,12 +1264,24 @@ declare var DOMStringList: { interface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap { "message": MessageEvent; + "messageerror": MessageEvent; } /** (the Worker global scope) is accessible through the self keyword. Some additional global functions, namespaces objects, and constructors, not typically associated with the worker global scope, but available on it, are listed in the JavaScript Reference. See also: Functions available to workers. */ interface DedicatedWorkerGlobalScope extends WorkerGlobalScope, AnimationFrameProvider { + /** + * Returns dedicatedWorkerGlobal's name, i.e. the value given to the Worker constructor. Primarily useful for debugging. + */ + readonly name: string; onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; + onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; + /** + * Aborts dedicatedWorkerGlobal. + */ close(): void; + /** + * Clones message and transmits it to the Worker object associated with dedicatedWorkerGlobal. transfer can be passed as a list of objects that are to be transferred rather than cloned. + */ postMessage(message: any, transfer: Transferable[]): void; postMessage(message: any, options?: PostMessageOptions): void; addEventListener(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -2318,10 +2330,6 @@ declare var NavigationPreloadManager: { new(): NavigationPreloadManager; }; -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; } @@ -2335,6 +2343,11 @@ interface NavigatorID { readonly userAgent: string; } +interface NavigatorLanguage { + readonly language: string; + readonly languages: ReadonlyArray; +} + interface NavigatorOnLine { readonly onLine: boolean; } @@ -3001,6 +3014,47 @@ declare var ServiceWorkerRegistration: { new(): ServiceWorkerRegistration; }; +interface SharedWorker extends EventTarget, AbstractWorker { + /** + * Returns sharedWorker's MessagePort object which can be used to communicate with the global environment. + */ + readonly port: MessagePort; + addEventListener(type: K, listener: (this: SharedWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: SharedWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var SharedWorker: { + prototype: SharedWorker; + new(scriptURL: string, options?: string | WorkerOptions): SharedWorker; +}; + +interface SharedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap { + "connect": MessageEvent; +} + +interface SharedWorkerGlobalScope extends WorkerGlobalScope { + /** + * Returns sharedWorkerGlobal's name, i.e. the value given to the SharedWorker constructor. Multiple SharedWorker objects can correspond to the same shared worker (and SharedWorkerGlobalScope), by reusing the same name. + */ + readonly name: string; + onconnect: ((this: SharedWorkerGlobalScope, ev: MessageEvent) => any) | null; + /** + * Aborts sharedWorkerGlobal. + */ + close(): void; + addEventListener(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var SharedWorkerGlobalScope: { + prototype: SharedWorkerGlobalScope; + new(): SharedWorkerGlobalScope; +}; + interface StorageManager { estimate(): Promise; persisted(): Promise; @@ -5342,11 +5396,6 @@ declare var WebSocket: { readonly OPEN: number; }; -interface WindowBase64 { - atob(encodedString: string): string; - btoa(rawString: string): string; -} - /** 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; @@ -5369,6 +5418,7 @@ interface WindowOrWorkerGlobalScope { readonly caches: CacheStorage; readonly crypto: Crypto; readonly indexedDB: IDBFactory; + readonly isSecureContext: boolean; readonly origin: string; readonly performance: Performance; atob(data: string): string; @@ -5385,13 +5435,21 @@ interface WindowOrWorkerGlobalScope { interface WorkerEventMap extends AbstractWorkerEventMap { "message": MessageEvent; + "messageerror": MessageEvent; } /** This Web Workers API interface represents a background task that can be easily created and can send messages back to its creator. Creating a worker is as simple as calling the Worker() constructor and specifying a script to be run in the worker thread. */ interface Worker extends EventTarget, AbstractWorker { onmessage: ((this: Worker, ev: MessageEvent) => any) | null; + onmessageerror: ((this: Worker, ev: MessageEvent) => any) | null; + /** + * Clones message and transmits it to worker's global environment. transfer can be passed as a list of objects that are to be transferred rather than cloned. + */ postMessage(message: any, transfer: Transferable[]): void; postMessage(message: any, options?: PostMessageOptions): void; + /** + * Aborts worker's associated global environment. + */ terminate(): void; addEventListener(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -5406,17 +5464,34 @@ declare var Worker: { interface WorkerGlobalScopeEventMap { "error": ErrorEvent; + "languagechange": Event; + "offline": Event; + "online": Event; + "rejectionhandled": PromiseRejectionEvent; + "unhandledrejection": PromiseRejectionEvent; } /** This Web Workers API interface is an interface representing the scope of any worker. Workers have no browsing context; this scope contains the information usually conveyed by Window objects — in this case event handlers, the console or the associated WorkerNavigator object. Each WorkerGlobalScope has its own event loop. */ -interface WorkerGlobalScope extends EventTarget, WindowConsole, WindowOrWorkerGlobalScope, WorkerUtils { - readonly caches: CacheStorage; - readonly isSecureContext: boolean; +interface WorkerGlobalScope extends EventTarget, WindowConsole, WindowOrWorkerGlobalScope { + /** + * Returns workerGlobal's WorkerLocation object. + */ readonly location: WorkerLocation; + readonly navigator: WorkerNavigator; onerror: ((this: WorkerGlobalScope, ev: ErrorEvent) => any) | null; - readonly performance: Performance; + onlanguagechange: ((this: WorkerGlobalScope, ev: Event) => any) | null; + onoffline: ((this: WorkerGlobalScope, ev: Event) => any) | null; + ononline: ((this: WorkerGlobalScope, ev: Event) => any) | null; + onrejectionhandled: ((this: WorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null; + onunhandledrejection: ((this: WorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null; + /** + * Returns workerGlobal. + */ readonly self: WorkerGlobalScope & typeof globalThis; - msWriteProfilerMark(profilerMarkName: string): void; + /** + * Fetches each URL in urls, executes them one-by-one in the order they are passed, and then returns (or throws if something went amiss). + */ + importScripts(...urls: string[]): void; addEventListener(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -5448,7 +5523,7 @@ 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 NavigatorBeacon, NavigatorConcurrentHardware, NavigatorID, NavigatorOnLine, NavigatorStorage { +interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorStorage { readonly permissions: Permissions; readonly serviceWorker: ServiceWorkerContainer; } @@ -5458,13 +5533,6 @@ declare var WorkerNavigator: { new(): WorkerNavigator; }; -interface WorkerUtils extends WindowBase64 { - readonly indexedDB: IDBFactory; - readonly msIndexedDB: IDBFactory; - readonly navigator: WorkerNavigator; - importScripts(...urls: string[]): void; -} - /** This Streams API interface provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing. */ interface WritableStream { readonly locked: boolean; @@ -5747,14 +5815,14 @@ declare namespace WebAssembly { function validate(bytes: BufferSource): boolean; } -interface EventHandlerNonNull { - (event: Event): any; -} - interface FrameRequestCallback { (time: number): void; } +interface OnErrorEventHandlerNonNull { + (event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any; +} + interface PerformanceObserverCallback { (entries: PerformanceObserverEntryList, observer: PerformanceObserver): void; } @@ -5803,35 +5871,52 @@ interface WritableStreamErrorCallback { (reason: any): void | PromiseLike; } +/** + * Returns dedicatedWorkerGlobal's name, i.e. the value given to the Worker constructor. Primarily useful for debugging. + */ +declare var name: string; declare var onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; +declare var onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; +/** + * Aborts dedicatedWorkerGlobal. + */ declare function close(): void; +/** + * Clones message and transmits it to the Worker object associated with dedicatedWorkerGlobal. transfer can be passed as a list of objects that are to be transferred rather than cloned. + */ declare function postMessage(message: any, transfer: Transferable[]): void; declare function postMessage(message: any, options?: PostMessageOptions): void; /** * Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */ declare function dispatchEvent(event: Event): boolean; -declare var caches: CacheStorage; -declare var isSecureContext: boolean; +/** + * Returns workerGlobal's WorkerLocation object. + */ declare var location: WorkerLocation; +declare var navigator: WorkerNavigator; declare var onerror: ((this: DedicatedWorkerGlobalScope, ev: ErrorEvent) => any) | null; -declare var performance: Performance; +declare var onlanguagechange: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null; +declare var onoffline: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null; +declare var ononline: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null; +declare var onrejectionhandled: ((this: DedicatedWorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null; +declare var onunhandledrejection: ((this: DedicatedWorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null; +/** + * Returns workerGlobal. + */ declare var self: WorkerGlobalScope & typeof globalThis; -declare function msWriteProfilerMark(profilerMarkName: string): void; +/** + * Fetches each URL in urls, executes them one-by-one in the order they are passed, and then returns (or throws if something went amiss). + */ +declare function importScripts(...urls: string[]): void; /** * Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */ declare function dispatchEvent(event: Event): boolean; -declare var indexedDB: IDBFactory; -declare var msIndexedDB: IDBFactory; -declare var navigator: WorkerNavigator; -declare function importScripts(...urls: string[]): void; -declare function atob(encodedString: string): string; -declare function btoa(rawString: string): string; -declare var console: Console; declare var caches: CacheStorage; declare var crypto: Crypto; declare var indexedDB: IDBFactory; +declare var isSecureContext: boolean; declare var origin: string; declare var performance: Performance; declare function atob(data: string): string; @@ -5844,6 +5929,7 @@ declare function fetch(input: RequestInfo, init?: RequestInit): Promise(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -5859,6 +5945,7 @@ type CanvasImageSource = ImageBitmap | OffscreenCanvas; type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext; type MessageEventSource = MessagePort | ServiceWorker; type ImageBitmapSource = CanvasImageSource | Blob | ImageData; +type OnErrorEventHandler = OnErrorEventHandlerNonNull | null; type TimerHandler = string | Function; type PerformanceEntryList = PerformanceEntry[]; type PushMessageDataInit = BufferSource | string; diff --git a/inputfiles/addedTypes.json b/inputfiles/addedTypes.json index c612bc495..6a543a990 100644 --- a/inputfiles/addedTypes.json +++ b/inputfiles/addedTypes.json @@ -229,13 +229,6 @@ "sharedworker", "all" ] - }, - "WorkerType": { - "name": "WorkerType", - "value": [ - "classic", - "module" - ] } } }, @@ -346,6 +339,20 @@ ] } }, + "BroadcastChannel": { + "events": { + "event": [ + { + "name": "message", + "type": "MessageEvent" + }, + { + "name": "messageerror", + "type": "MessageEvent" + } + ] + } + }, "DeviceMotionEventAcceleration": { "no-interface-object": 1 }, @@ -2171,6 +2178,16 @@ } } }, + "SharedWorker": { + "events": { + "event": [ + { + "name": "connect", + "type": "MessageEvent" + } + ] + } + }, "TextDecoderStream": { "properties": { "property": { @@ -2246,6 +2263,23 @@ } ] } + }, + "WorkerGlobalScope": { + "events": { + "event": [ + { + "name": "rejectionhandled", + "type": "PromiseRejectionEvent" + }, + { + "name": "unhandledrejection", + "type": "PromiseRejectionEvent" + } + ] + }, + "implements": [ + "WindowConsole" + ] } } }, diff --git a/inputfiles/idl/Beacon.widl b/inputfiles/idl/Beacon.widl new file mode 100644 index 000000000..e02ae65fa --- /dev/null +++ b/inputfiles/idl/Beacon.widl @@ -0,0 +1,3 @@ +partial interface Navigator { + boolean sendBeacon(USVString url, optional BodyInit? data = null); +}; diff --git a/inputfiles/idl/HTML - Web workers.commentmap.json b/inputfiles/idl/HTML - Web workers.commentmap.json new file mode 100644 index 000000000..492e889bc --- /dev/null +++ b/inputfiles/idl/HTML - Web workers.commentmap.json @@ -0,0 +1,17 @@ +{ + "workerglobalscope-self": "Returns workerGlobal.", + "workerglobalscope-location": "Returns workerGlobal's WorkerLocation object.", + "worker-navigator": "Returns workerGlobal's WorkerNavigator object.", + "workerglobalscope-importscripts": "Fetches each URL in urls, executes them one-by-one in the order they are passed, and then returns (or throws if something went amiss).", + "dedicatedworkerglobalscope-name": "Returns dedicatedWorkerGlobal's name, i.e. the value given to the Worker constructor. Primarily useful for debugging.", + "dedicatedworkerglobalscope-postmessage": "Clones message and transmits it to the Worker object associated with dedicatedWorkerGlobal. transfer can be passed as a list of objects that are to be transferred rather than cloned.", + "dedicatedworkerglobalscope-close": "Aborts dedicatedWorkerGlobal.", + "sharedworkerglobalscope-name": "Returns sharedWorkerGlobal's name, i.e. the value given to the SharedWorker constructor. Multiple SharedWorker objects can correspond to the same shared worker (and SharedWorkerGlobalScope), by reusing the same name.", + "sharedworkerglobalscope-close": "Aborts sharedWorkerGlobal.", + "worker": "Returns a new Worker object. scriptURL will be fetched and executed in the background, creating a new global environment for which worker represents the communication channel. options can be used to define the name of that global environment via the name option, primarily for debugging purposes. It can also ensure this new global environment supports JavaScript modules (specify type: \"module\"), and if that is specified, can also be used to specify how scriptURL is fetched through the credentials option.", + "worker-terminate": "Aborts worker's associated global environment.", + "worker-postmessage": "Clones message and transmits it to worker's global environment. transfer can be passed as a list of objects that are to be transferred rather than cloned.", + "sharedworker": "Returns a new SharedWorker object. scriptURL will be fetched and executed in the background, creating a new global environment for which sharedWorker represents the communication channel. name can be used to define the name of that global environment.", + "sharedworker-port": "Returns sharedWorker's MessagePort object which can be used to communicate with the global environment.", + "navigator": "Returns the number of logical processors potentially available to the user agent." +} diff --git a/inputfiles/idl/HTML - Web workers.widl b/inputfiles/idl/HTML - Web workers.widl new file mode 100644 index 000000000..0ef3b12c5 --- /dev/null +++ b/inputfiles/idl/HTML - Web workers.widl @@ -0,0 +1,94 @@ +[Exposed=Worker] +interface WorkerGlobalScope : EventTarget { + readonly attribute WorkerGlobalScope self; + readonly attribute WorkerLocation location; + readonly attribute WorkerNavigator navigator; + void importScripts(USVString... urls); + + attribute OnErrorEventHandler onerror; + attribute EventHandler onlanguagechange; + attribute EventHandler onoffline; + attribute EventHandler ononline; + attribute EventHandler onrejectionhandled; + attribute EventHandler onunhandledrejection; +}; + +[Global=(Worker,DedicatedWorker),Exposed=DedicatedWorker] +interface DedicatedWorkerGlobalScope : WorkerGlobalScope { + [Replaceable] readonly attribute DOMString name; + + void postMessage(any message, sequence transfer); + void postMessage(any message, optional PostMessageOptions options = {}); + + void close(); + + attribute EventHandler onmessage; + attribute EventHandler onmessageerror; +}; + +[Global=(Worker,SharedWorker),Exposed=SharedWorker] +interface SharedWorkerGlobalScope : WorkerGlobalScope { + [Replaceable] readonly attribute DOMString name; + + void close(); + + attribute EventHandler onconnect; +}; + +interface mixin AbstractWorker { + attribute EventHandler onerror; +}; + +[Exposed=(Window,Worker)] +interface Worker : EventTarget { + constructor(USVString scriptURL, optional WorkerOptions options = {}); + + void terminate(); + + void postMessage(any message, sequence transfer); + void postMessage(any message, optional PostMessageOptions options = {}); + attribute EventHandler onmessage; + attribute EventHandler onmessageerror; +}; + +dictionary WorkerOptions { + WorkerType type = "classic"; + RequestCredentials credentials = "same-origin"; // credentials is only used if type is "module" + DOMString name = ""; +}; + +enum WorkerType { "classic", "module" }; + +Worker includes AbstractWorker; + +[Exposed=(Window,Worker)] +interface SharedWorker : EventTarget { + constructor(USVString scriptURL, optional (DOMString or WorkerOptions) options = {}); + + readonly attribute MessagePort port; +}; +SharedWorker includes AbstractWorker; + +interface mixin NavigatorConcurrentHardware { + readonly attribute unsigned long long hardwareConcurrency; +}; + +[Exposed=Worker] +interface WorkerNavigator {}; +WorkerNavigator includes NavigatorID; +WorkerNavigator includes NavigatorLanguage; +WorkerNavigator includes NavigatorOnLine; +WorkerNavigator includes NavigatorConcurrentHardware; + +[Exposed=Worker] +interface WorkerLocation { + stringifier readonly attribute USVString href; + readonly attribute USVString origin; + readonly attribute USVString protocol; + readonly attribute USVString host; + readonly attribute USVString hostname; + readonly attribute USVString port; + readonly attribute USVString pathname; + readonly attribute USVString search; + readonly attribute USVString hash; +}; diff --git a/inputfiles/idl/Secure Contexts.widl b/inputfiles/idl/Secure Contexts.widl new file mode 100644 index 000000000..2aeafca88 --- /dev/null +++ b/inputfiles/idl/Secure Contexts.widl @@ -0,0 +1,3 @@ +partial interface WindowOrWorkerGlobalScope { + readonly attribute boolean isSecureContext; +}; diff --git a/inputfiles/idlSources.json b/inputfiles/idlSources.json index 876d52514..3d81dd121 100644 --- a/inputfiles/idlSources.json +++ b/inputfiles/idlSources.json @@ -1,4 +1,8 @@ [ + { + "url": "https://www.w3.org/TR/beacon/", + "title": "Beacon" + }, { "url": "https://www.w3.org/TR/clipboard-apis/", "title": "Clipboard" @@ -334,6 +338,10 @@ "url": "https://html.spec.whatwg.org/multipage/webstorage.html", "title": "HTML - Web storage" }, + { + "url": "https://html.spec.whatwg.org/multipage/workers.html", + "title": "HTML - Web workers" + }, { "url": "https://html.spec.whatwg.org/multipage/interaction.html", "title": "HTML - User interaction" @@ -402,6 +410,10 @@ "url": "https://www.w3.org/TR/screen-orientation/", "title": "Screen Orientation" }, + { + "url": "https://www.w3.org/TR/secure-contexts/", + "title": "Secure Contexts" + }, { "url": "https://www.w3.org/TR/selection-api/", "title": "Selection" diff --git a/inputfiles/removedTypes.json b/inputfiles/removedTypes.json index d1407af4e..9e69a1a1e 100644 --- a/inputfiles/removedTypes.json +++ b/inputfiles/removedTypes.json @@ -303,6 +303,7 @@ "browser": null, "caches": null, "crypto": null, + "isSecureContext": null, "msCredentials": null, "ontouchcancel": null, "ontouchend": null, @@ -324,11 +325,6 @@ "WindowTimers" ] }, - "WorkerGlobalScope": { - "implements": [ - "GlobalFetch" - ] - }, "XPathNSResolver": null } },