diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..39b6076a2 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +# Basic dependabot.yml file +# https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/enabling-and-disabling-version-updates + +version: 2 +updates: + # Enable version updates for npm + - package-ecosystem: "npm" + # Look for `package.json` and `lock` files in the `root` directory + directory: "/" + # Check the npm registry for updates every month + schedule: + interval: "monthly" + # Bump versions in package.json + # https://github.com/dependabot/dependabot-core/issues/3103 + # https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#versioning-strategy + versioning-strategy: "increase" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f88c5f16..5ecee45ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,6 @@ jobs: with: node-version: '15' - - run: npm install + - run: npm ci - run: npm run build - run: npm test diff --git a/.github/workflows/test_typescript.yml b/.github/workflows/test_typescript.yml index ca0d44eca..44e345a77 100644 --- a/.github/workflows/test_typescript.yml +++ b/.github/workflows/test_typescript.yml @@ -36,7 +36,7 @@ jobs: git diff > baseline-changes.diff - name: Danger - run: npm run danger -- ci + run: npx danger -- ci env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/update-core-deps.yml b/.github/workflows/update-core-deps.yml new file mode 100644 index 000000000..d7faf2053 --- /dev/null +++ b/.github/workflows/update-core-deps.yml @@ -0,0 +1,33 @@ +name: Update core dependencies +on: + workflow_dispatch: + schedule: + # https://crontab.guru/#5_8_*_*_* + - cron: "5 8 * * *" + +# Conditional runs +# https://stackoverflow.com/a/61832535/2460034 +jobs: + update-webref: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: '15' + + - run: npm i -g npm-check-updates + - run: ncu -u + - run: npm i + - run: npm run build && npm run baseline-accept + - id: git-diff + run: git diff --quiet HEAD baselines + continue-on-error: true + - uses: peter-evans/create-pull-request@v3 + if: ${{ steps.git-diff.outcome == 'failure' }} + with: + commit-message: "chore(package): update core dependencies" + title: "chore(package): update core dependencies" + branch: update-core-deps + token: ${{ secrets.TS_GITHUB_BOT_AUTH }} + diff --git a/.gitignore b/.gitignore index cad483484..bb63c80db 100644 --- a/.gitignore +++ b/.gitignore @@ -283,7 +283,6 @@ lib/ inputfiles/browser.webidl.json .vscode/* !.vscode/launch.template.json -package-lock.json yarn.lock TypeScript deploy/generated \ No newline at end of file diff --git a/.npmrc b/.npmrc index 43c97e719..6a53f1de4 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1 @@ -package-lock=false +message="chore(package): bump version number to v%s" diff --git a/CODEOWNERS b/CODEOWNERS deleted file mode 100644 index e273c4597..000000000 --- a/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @sandersn \ No newline at end of file diff --git a/README.md b/README.md index 22b71aaf7..95d2d78f4 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,12 @@ # TypeScript and JavaScript lib generator -Travis CI Status: [![Build Status](https://travis-ci.org/Microsoft/TSJS-lib-generator.svg?branch=master)](https://travis-ci.org/Microsoft/TSJS-lib-generator) +This tool is used to generate the web-based `lib.dom.d.ts` file which is included with TypeScript releases, and as the `@types/web` package. -This tool is used to generate `dom.generated.d.ts`, `webworker.generated.d.ts` and `dom.iterable.generated.d.ts` for TypeScript. -The input file is the JSON webidl file generated by the Microsoft Edge browser. +## Why is my fancy API still not available here? + +A feature needs to be supported by more than two major browser engines to be included here, to make sure there is a good consensus among vendors: __Gecko__ (Firefox), __Blink__ (Chrome/Edge), and __WebKit__ (Safari). + +If the condition is met but still is not available here, please [file an issue](hthttps://github.com/microsoft/TypeScript-DOM-lib-generator/issues/new). ## Build Instructions @@ -53,11 +56,10 @@ The format of each file can be inferred from their existing content. The common steps to send a pull request are: -0. Open or refer to an issue in the [TypeScript repo](https://github.com/Microsoft/TypeScript). -1. Add missing elements to `inputfiles/addedTypes.json`, overriding elements to `inputfiles/overridingTypes.json`, or elements to remove to `inputfiles/removedTypes.json`. +0. Open or refer to an issue in the [TypeScript repo](https://github.com/Microsoft/TypeScript) which might get moved back to this repo. +1. Update an IDL or add missing elements to `inputfiles/addedTypes.json`, overriding elements to `inputfiles/overridingTypes.json`, or elements to remove to `inputfiles/removedTypes.json`. 2. Run the build script locally to obtain new `dom.generated.d.ts` and `webworker.generated.d.ts`. -3. Update the files in the `baselines` folder using the newly generated files - under `generated` folder (`npm run baseline-accept`). +3. Update the files in the `baselines` folder using the newly generated files under `generated` folder (`npm run baseline-accept`). ### What are the TypeScript team's heuristics for PRs to the DOM APIs @@ -95,6 +97,8 @@ To give you a sense of whether we will accept changes, you can use these heurist - Does an internet search for the fields show results in blogs/recommendations? - When was the deprecation (this can be hard to find) but was it at least 2 years ago if so? +## Build Instructions + # This repo ## Code Structure diff --git a/baselines/audioworklet.generated.d.ts b/baselines/audioworklet.generated.d.ts new file mode 100644 index 000000000..9963a2b8e --- /dev/null +++ b/baselines/audioworklet.generated.d.ts @@ -0,0 +1,662 @@ +///////////////////////////// +/// AudioWorklet APIs +///////////////////////////// + +interface AddEventListenerOptions extends EventListenerOptions { + once?: boolean; + passive?: boolean; +} + +interface EventInit { + bubbles?: boolean; + cancelable?: boolean; + composed?: boolean; +} + +interface EventListenerOptions { + capture?: boolean; +} + +interface MessageEventInit extends EventInit { + data?: T; + lastEventId?: string; + origin?: string; + ports?: MessagePort[]; + source?: MessageEventSource | null; +} + +interface PostMessageOptions { + transfer?: any[]; +} + +interface QueuingStrategy { + highWaterMark?: number; + size?: QueuingStrategySize; +} + +interface QueuingStrategyInit { + /** + * Creates a new ByteLengthQueuingStrategy with the provided high water mark. + * + * Note that the provided high water mark will not be validated ahead of time. Instead, if it is negative, NaN, or not a number, the resulting ByteLengthQueuingStrategy will cause the corresponding stream constructor to throw. + */ + highWaterMark: number; +} + +interface ReadableStreamDefaultReadDoneResult { + done: true; + value?: undefined; +} + +interface ReadableStreamDefaultReadValueResult { + done: false; + value: T; +} + +interface ReadableWritablePair { + readable: ReadableStream; + /** + * Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use. + * + * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader. + */ + writable: WritableStream; +} + +interface StreamPipeOptions { + preventAbort?: boolean; + preventCancel?: boolean; + /** + * Pipes this readable stream to a given writable stream destination. The way in which the piping process behaves under various error conditions can be customized with a number of passed options. It returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered. + * + * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader. + * + * Errors and closures of the source and destination streams propagate as follows: + * + * An error in this source readable stream will abort destination, unless preventAbort is truthy. The returned promise will be rejected with the source's error, or with any error that occurs during aborting the destination. + * + * An error in destination will cancel this source readable stream, unless preventCancel is truthy. The returned promise will be rejected with the destination's error, or with any error that occurs during canceling the source. + * + * When this source readable stream closes, destination will be closed, unless preventClose is truthy. The returned promise will be fulfilled once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error. + * + * If destination starts out closed or closing, this source readable stream will be canceled, unless preventCancel is true. The returned promise will be rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source. + * + * The signal option can be set to an AbortSignal to allow aborting an ongoing pipe operation via the corresponding AbortController. In this case, this source readable stream will be canceled, and destination aborted, unless the respective options preventCancel or preventAbort are set. + */ + preventClose?: boolean; +} + +interface Transformer { + flush?: TransformerFlushCallback; + readableType?: undefined; + start?: TransformerStartCallback; + transform?: TransformerTransformCallback; + writableType?: undefined; +} + +interface UnderlyingSink { + abort?: UnderlyingSinkAbortCallback; + close?: UnderlyingSinkCloseCallback; + start?: UnderlyingSinkStartCallback; + type?: undefined; + write?: UnderlyingSinkWriteCallback; +} + +interface UnderlyingSource { + cancel?: UnderlyingSourceCancelCallback; + pull?: UnderlyingSourcePullCallback; + start?: UnderlyingSourceStartCallback; + type?: undefined; +} + +interface AudioWorkletGlobalScope extends WorkletGlobalScope { + readonly currentFrame: number; + readonly currentTime: number; + readonly sampleRate: number; + registerProcessor(name: string, processorCtor: AudioWorkletProcessorConstructor): void; +} + +declare var AudioWorkletGlobalScope: { + prototype: AudioWorkletGlobalScope; + new(): AudioWorkletGlobalScope; +}; + +interface AudioWorkletProcessor { + readonly port: MessagePort; +} + +declare var AudioWorkletProcessor: { + prototype: AudioWorkletProcessor; + new(): AudioWorkletProcessor; +}; + +/** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */ +interface ByteLengthQueuingStrategy extends QueuingStrategy { + readonly highWaterMark: number; + readonly size: QueuingStrategySize; +} + +declare var ByteLengthQueuingStrategy: { + prototype: ByteLengthQueuingStrategy; + new(init: QueuingStrategyInit): ByteLengthQueuingStrategy; +}; + +/** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */ +interface CountQueuingStrategy extends QueuingStrategy { + readonly highWaterMark: number; + readonly size: QueuingStrategySize; +} + +declare var CountQueuingStrategy: { + prototype: CountQueuingStrategy; + new(init: QueuingStrategyInit): CountQueuingStrategy; +}; + +/** An event which takes place in the DOM. */ +interface Event { + /** + * Returns true or false depending on how event was initialized. True if event goes through its target's ancestors in reverse tree order, and false otherwise. + */ + readonly bubbles: boolean; + cancelBubble: boolean; + /** + * Returns true or false depending on how event was initialized. Its return value does not always carry meaning, but true can indicate that part of the operation during which event was dispatched, can be canceled by invoking the preventDefault() method. + */ + readonly cancelable: boolean; + /** + * Returns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise. + */ + readonly composed: boolean; + /** + * Returns the object whose event listener's callback is currently being invoked. + */ + readonly currentTarget: EventTarget | null; + /** + * Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise. + */ + readonly defaultPrevented: boolean; + /** + * Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE. + */ + readonly eventPhase: number; + /** + * Returns true if event was dispatched by the user agent, and false otherwise. + */ + readonly isTrusted: boolean; + /** @deprecated */ + returnValue: boolean; + /** @deprecated */ + readonly srcElement: EventTarget | null; + /** + * Returns the object to which event is dispatched (its target). + */ + readonly target: EventTarget | null; + /** + * Returns the event's timestamp as the number of milliseconds measured relative to the time origin. + */ + readonly timeStamp: DOMHighResTimeStamp; + /** + * Returns the type of event, e.g. "click", "hashchange", or "submit". + */ + readonly type: string; + /** + * Returns the invocation target objects of event's path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root's mode is "closed" that are not reachable from event's currentTarget. + */ + composedPath(): EventTarget[]; + /** @deprecated */ + initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void; + /** + * If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled. + */ + preventDefault(): void; + /** + * Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects. + */ + stopImmediatePropagation(): void; + /** + * When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object. + */ + stopPropagation(): void; + readonly AT_TARGET: number; + readonly BUBBLING_PHASE: number; + readonly CAPTURING_PHASE: number; + readonly NONE: number; +} + +declare var Event: { + prototype: Event; + new(type: string, eventInitDict?: EventInit): Event; + readonly AT_TARGET: number; + readonly BUBBLING_PHASE: number; + readonly CAPTURING_PHASE: number; + readonly NONE: number; +}; + +interface EventListener { + (evt: Event): void; +} + +interface EventListenerObject { + handleEvent(object: Event): void; +} + +/** EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them. */ +interface EventTarget { + /** + * Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. + * + * The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. + * + * When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. + * + * When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. + * + * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. + * + * If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + * + * The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture. + */ + addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): 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. + */ + dispatchEvent(event: Event): boolean; + /** + * Removes the event listener in target's event listener list with the same type, callback, and options. + */ + removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void; +} + +declare var EventTarget: { + prototype: EventTarget; + new(): EventTarget; +}; + +/** A message received by a target object. */ +interface MessageEvent extends Event { + /** + * Returns the data of the message. + */ + readonly data: T; + /** + * Returns the last event ID string, for server-sent events. + */ + readonly lastEventId: string; + /** + * Returns the origin of the message, for server-sent events and cross-document messaging. + */ + readonly origin: string; + /** + * Returns the MessagePort array sent with the message, for cross-document messaging and channel messaging. + */ + readonly ports: ReadonlyArray; + /** + * Returns the WindowProxy of the source window, for cross-document messaging, and the MessagePort being attached, in the connect event fired at SharedWorkerGlobalScope objects. + */ + readonly source: MessageEventSource | null; + /** @deprecated */ + initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: MessagePort[]): void; +} + +declare var MessageEvent: { + prototype: MessageEvent; + new(type: string, eventInitDict?: MessageEventInit): MessageEvent; +}; + +interface MessagePortEventMap { + "message": MessageEvent; + "messageerror": MessageEvent; +} + +/** This Channel Messaging API interface represents one of the two ports of a MessageChannel, allowing messages to be sent from one port and listening out for them arriving at the other. */ +interface MessagePort extends EventTarget { + onmessage: ((this: MessagePort, ev: MessageEvent) => any) | null; + onmessageerror: ((this: MessagePort, ev: MessageEvent) => any) | null; + /** + * Disconnects the port, so that it is no longer active. + */ + close(): void; + /** + * Posts a message through the channel. Objects listed in transfer are transferred, not just cloned, meaning that they are no longer usable on the sending side. + * + * Throws a "DataCloneError" DOMException if transfer contains duplicate objects or port, or if message could not be cloned. + */ + postMessage(message: any, transfer: Transferable[]): void; + postMessage(message: any, options?: PostMessageOptions): void; + /** + * Begins dispatching messages received on the port. + */ + start(): void; + addEventListener(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var MessagePort: { + prototype: MessagePort; + new(): MessagePort; +}; + +/** This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object. */ +interface ReadableStream { + readonly locked: boolean; + cancel(reason?: any): Promise; + getReader(): ReadableStreamDefaultReader; + pipeThrough(transform: ReadableWritablePair, options?: StreamPipeOptions): ReadableStream; + pipeTo(destination: WritableStream, options?: StreamPipeOptions): Promise; + tee(): [ReadableStream, ReadableStream]; + forEach(callbackfn: (value: any, key: number, parent: ReadableStream) => void, thisArg?: any): void; +} + +declare var ReadableStream: { + prototype: ReadableStream; + new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; +}; + +interface ReadableStreamDefaultController { + readonly desiredSize: number | null; + close(): void; + enqueue(chunk?: R): void; + error(e?: any): void; +} + +declare var ReadableStreamDefaultController: { + prototype: ReadableStreamDefaultController; + new(): ReadableStreamDefaultController; +}; + +interface ReadableStreamDefaultReader extends ReadableStreamGenericReader { + read(): Promise>; + releaseLock(): void; +} + +declare var ReadableStreamDefaultReader: { + prototype: ReadableStreamDefaultReader; + new(stream: ReadableStream): ReadableStreamDefaultReader; +}; + +interface ReadableStreamGenericReader { + readonly closed: Promise; + cancel(reason?: any): Promise; +} + +interface TransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; +} + +declare var TransformStream: { + prototype: TransformStream; + new(transformer?: Transformer, writableStrategy?: QueuingStrategy, readableStrategy?: QueuingStrategy): TransformStream; +}; + +interface TransformStreamDefaultController { + readonly desiredSize: number | null; + enqueue(chunk?: O): void; + error(reason?: any): void; + terminate(): void; +} + +declare var TransformStreamDefaultController: { + prototype: TransformStreamDefaultController; + new(): TransformStreamDefaultController; +}; + +interface WorkletGlobalScope { +} + +declare var WorkletGlobalScope: { + prototype: WorkletGlobalScope; + new(): WorkletGlobalScope; +}; + +/** 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; + abort(reason?: any): Promise; + close(): Promise; + getWriter(): WritableStreamDefaultWriter; +} + +declare var WritableStream: { + prototype: WritableStream; + new(underlyingSink?: UnderlyingSink, strategy?: QueuingStrategy): WritableStream; +}; + +/** This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate. */ +interface WritableStreamDefaultController { + error(e?: any): void; +} + +declare var WritableStreamDefaultController: { + prototype: WritableStreamDefaultController; + new(): WritableStreamDefaultController; +}; + +/** This Streams API interface is the object returned by WritableStream.getWriter() and once created locks the < writer to the WritableStream ensuring that no other streams can write to the underlying sink. */ +interface WritableStreamDefaultWriter { + readonly closed: Promise; + readonly desiredSize: number | null; + readonly ready: Promise; + abort(reason?: any): Promise; + close(): Promise; + releaseLock(): void; + write(chunk?: W): Promise; +} + +declare var WritableStreamDefaultWriter: { + prototype: WritableStreamDefaultWriter; + new(stream: WritableStream): WritableStreamDefaultWriter; +}; + +interface Console { + assert(condition?: boolean, ...data: any[]): void; + clear(): void; + count(label?: string): void; + countReset(label?: string): void; + debug(...data: any[]): void; + dir(item?: any, options?: any): void; + dirxml(...data: any[]): void; + error(...data: any[]): void; + group(...data: any[]): void; + groupCollapsed(...data: any[]): void; + groupEnd(): void; + info(...data: any[]): void; + log(...data: any[]): void; + table(tabularData?: any, properties?: string[]): void; + time(label?: string): void; + timeEnd(label?: string): void; + timeLog(label?: string, ...data: any[]): void; + timeStamp(label?: string): void; + trace(...data: any[]): void; + warn(...data: any[]): void; +} + +declare var console: Console; + +declare namespace WebAssembly { + interface CompileError extends Error { + } + + var CompileError: { + prototype: CompileError; + new(): CompileError; + }; + + interface Global { + value: any; + valueOf(): any; + } + + var Global: { + prototype: Global; + new(descriptor: GlobalDescriptor, v?: any): Global; + }; + + interface Instance { + readonly exports: Exports; + } + + var Instance: { + prototype: Instance; + new(module: Module, importObject?: Imports): Instance; + }; + + interface LinkError extends Error { + } + + var LinkError: { + prototype: LinkError; + new(): LinkError; + }; + + interface Memory { + readonly buffer: ArrayBuffer; + grow(delta: number): number; + } + + var Memory: { + prototype: Memory; + new(descriptor: MemoryDescriptor): Memory; + }; + + interface Module { + } + + var Module: { + prototype: Module; + new(bytes: BufferSource): Module; + customSections(moduleObject: Module, sectionName: string): ArrayBuffer[]; + exports(moduleObject: Module): ModuleExportDescriptor[]; + imports(moduleObject: Module): ModuleImportDescriptor[]; + }; + + interface RuntimeError extends Error { + } + + var RuntimeError: { + prototype: RuntimeError; + new(): RuntimeError; + }; + + interface Table { + readonly length: number; + get(index: number): any; + grow(delta: number, value?: any): number; + set(index: number, value?: any): void; + } + + var Table: { + prototype: Table; + new(descriptor: TableDescriptor, value?: any): Table; + }; + + interface GlobalDescriptor { + mutable?: boolean; + value: ValueType; + } + + interface MemoryDescriptor { + initial: number; + maximum?: number; + shared?: boolean; + } + + interface ModuleExportDescriptor { + kind: ImportExportKind; + name: string; + } + + interface ModuleImportDescriptor { + kind: ImportExportKind; + module: string; + name: string; + } + + interface TableDescriptor { + element: TableKind; + initial: number; + maximum?: number; + } + + interface WebAssemblyInstantiatedSource { + instance: Instance; + module: Module; + } + + type ImportExportKind = "function" | "global" | "memory" | "table"; + type TableKind = "anyfunc" | "externref"; + type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64"; + type ExportValue = Function | Global | Memory | Table; + type Exports = Record; + type ImportValue = ExportValue | number; + type Imports = Record; + type ModuleImports = Record; + function compile(bytes: BufferSource): Promise; + function instantiate(bytes: BufferSource, importObject?: Imports): Promise; + function instantiate(moduleObject: Module, importObject?: Imports): Promise; + function validate(bytes: BufferSource): boolean; +} + +interface AudioWorkletProcessorConstructor { + (options: any): AudioWorkletProcessor; +} + +interface QueuingStrategySize { + (chunk?: T): number; +} + +interface TransformerFlushCallback { + (controller: TransformStreamDefaultController): void | PromiseLike; +} + +interface TransformerStartCallback { + (controller: TransformStreamDefaultController): any; +} + +interface TransformerTransformCallback { + (chunk: I, controller: TransformStreamDefaultController): void | PromiseLike; +} + +interface UnderlyingSinkAbortCallback { + (reason?: any): void | PromiseLike; +} + +interface UnderlyingSinkCloseCallback { + (): void | PromiseLike; +} + +interface UnderlyingSinkStartCallback { + (controller: WritableStreamDefaultController): any; +} + +interface UnderlyingSinkWriteCallback { + (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike; +} + +interface UnderlyingSourceCancelCallback { + (reason?: any): void | PromiseLike; +} + +interface UnderlyingSourcePullCallback { + (controller: ReadableStreamController): void | PromiseLike; +} + +interface UnderlyingSourceStartCallback { + (controller: ReadableStreamController): any; +} + +declare var currentFrame: number; +declare var currentTime: number; +declare var sampleRate: number; +declare function registerProcessor(name: string, processorCtor: AudioWorkletProcessorConstructor): void; +type BufferSource = ArrayBufferView | ArrayBuffer; +type DOMHighResTimeStamp = number; +type EventListenerOrEventListenerObject = EventListener | EventListenerObject; +type MessageEventSource = MessagePort; +type ReadableStreamController = ReadableStreamDefaultController; +type ReadableStreamDefaultReadResult = ReadableStreamDefaultReadValueResult | ReadableStreamDefaultReadDoneResult; +type ReadableStreamReader = ReadableStreamDefaultReader; +type Transferable = ArrayBuffer | MessagePort; diff --git a/baselines/audioworklet.iterable.generated.d.ts b/baselines/audioworklet.iterable.generated.d.ts new file mode 100644 index 000000000..c807fd845 --- /dev/null +++ b/baselines/audioworklet.iterable.generated.d.ts @@ -0,0 +1,15 @@ +///////////////////////////// +/// AudioWorklet Iterable APIs +///////////////////////////// + +interface MessageEvent { + /** @deprecated */ + initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; +} + +interface ReadableStream { + [Symbol.iterator](): IterableIterator; + entries(): IterableIterator<[number, any]>; + keys(): IterableIterator; + values(): IterableIterator; +} diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 1a8c1c6ee..f1992752e 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -1,31 +1,19 @@ ///////////////////////////// -/// DOM APIs +/// Window APIs ///////////////////////////// interface AddEventListenerOptions extends EventListenerOptions { once?: boolean; passive?: boolean; -} - -interface AddressErrors { - addressLine?: string; - city?: string; - country?: string; - dependentLocality?: string; - organization?: string; - phone?: string; - postalCode?: string; - recipient?: string; - region?: string; - sortingCode?: string; + signal?: AbortSignal; } interface AesCbcParams extends Algorithm { - iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; + iv: BufferSource; } interface AesCtrParams extends Algorithm { - counter: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; + counter: BufferSource; length: number; } @@ -34,8 +22,8 @@ interface AesDerivedKeyParams extends Algorithm { } interface AesGcmParams extends Algorithm { - additionalData?: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; - iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; + additionalData?: BufferSource; + iv: BufferSource; tagLength?: number; } @@ -88,9 +76,12 @@ interface AudioBufferSourceOptions { playbackRate?: number; } -interface AudioContextInfo { - currentTime?: number; - sampleRate?: number; +interface AudioConfiguration { + bitrate?: number; + channels?: string; + contentType: string; + samplerate?: number; + spatialRendering?: boolean; } interface AudioContextOptions { @@ -104,14 +95,6 @@ interface AudioNodeOptions { channelInterpretation?: ChannelInterpretation; } -interface AudioParamDescriptor { - automationRate?: AutomationRate; - defaultValue?: number; - maxValue?: number; - minValue?: number; - name: string; -} - interface AudioProcessingEventInit extends EventInit { inputBuffer: AudioBuffer; outputBuffer: AudioBuffer; @@ -120,7 +103,7 @@ interface AudioProcessingEventInit extends EventInit { interface AudioTimestamp { contextTime?: number; - performanceTime?: number; + performanceTime?: DOMHighResTimeStamp; } interface AudioWorkletNodeOptions extends AudioNodeOptions { @@ -159,13 +142,20 @@ interface BiquadFilterOptions extends AudioNodeOptions { type?: BiquadFilterType; } +interface BlobEventInit { + data: Blob; + timecode?: DOMHighResTimeStamp; +} + interface BlobPropertyBag { endings?: EndingType; type?: string; } -interface ByteLengthChunk { - byteLength?: number; +interface CSSStyleSheetInit { + baseURL?: string; + disabled?: boolean; + media?: MediaList | string; } interface CacheQueryOptions { @@ -176,7 +166,9 @@ interface CacheQueryOptions { interface CanvasRenderingContext2DSettings { alpha?: boolean; + colorSpace?: PredefinedColorSpace; desynchronized?: boolean; + willReadFrequently?: boolean; } interface ChannelMergerOptions extends AudioNodeOptions { @@ -196,6 +188,10 @@ interface ClipboardEventInit extends EventInit { clipboardData?: DataTransfer | null; } +interface ClipboardItemOptions { + presentationStyle?: PresentationStyle; +} + interface CloseEventInit extends EventInit { code?: number; reason?: string; @@ -207,11 +203,12 @@ interface CompositionEventInit extends UIEventInit { } interface ComputedEffectTiming extends EffectTiming { - activeDuration?: number; + activeDuration?: CSSNumberish; currentIteration?: number | null; - endTime?: number; - localTime?: number | null; - progress?: number | null; + endTime?: CSSNumberish; + localTime?: CSSNumberish | null; + progress?: CSSNumberish | null; + startTime?: CSSNumberish; } interface ComputedKeyframe { @@ -222,10 +219,6 @@ interface ComputedKeyframe { [property: string]: string | number | null | undefined; } -interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation { - arrayOfDomainStrings?: string[]; -} - interface ConstantSourceOptions { offset?: number; } @@ -250,11 +243,6 @@ interface ConstrainULongRange extends ULongRange { ideal?: number; } -interface ConstrainVideoFacingModeParameters { - exact?: VideoFacingModeEnum | VideoFacingModeEnum[]; - ideal?: VideoFacingModeEnum | VideoFacingModeEnum[]; -} - interface ConvolverOptions extends AudioNodeOptions { buffer?: AudioBuffer | null; disableNormalization?: boolean; @@ -275,6 +263,11 @@ interface CredentialRequestOptions { signal?: AbortSignal; } +interface CryptoKeyPair { + privateKey?: CryptoKey; + publicKey?: CryptoKey; +} + interface CustomEventInit extends EventInit { detail?: T; } @@ -360,13 +353,13 @@ interface DeviceOrientationEventInit extends EventInit { gamma?: number | null; } -interface DevicePermissionDescriptor extends PermissionDescriptor { - deviceId?: string; - name: "camera" | "microphone" | "speaker"; +interface DisplayMediaStreamConstraints { + audio?: boolean | MediaTrackConstraints; + video?: boolean | MediaTrackConstraints; } interface DocumentTimelineOptions { - originTime?: number; + originTime?: DOMHighResTimeStamp; } interface DoubleRange { @@ -415,6 +408,7 @@ interface EffectTiming { fill?: FillMode; iterationStart?: number; iterations?: number; + playbackRate?: number; } interface ElementCreationOptions { @@ -464,35 +458,39 @@ interface EventSourceInit { withCredentials?: boolean; } -interface ExceptionInformation { - domain?: string | null; -} - interface FilePropertyBag extends BlobPropertyBag { lastModified?: number; } +interface FileSystemFlags { + create?: boolean; + exclusive?: boolean; +} + interface FocusEventInit extends UIEventInit { relatedTarget?: EventTarget | null; } -interface FocusNavigationEventInit extends EventInit { - navigationReason?: string | null; - originHeight?: number; - originLeft?: number; - originTop?: number; - originWidth?: number; +interface FocusOptions { + preventScroll?: boolean; +} + +interface FontFaceDescriptors { + display?: string; + featureSettings?: string; + stretch?: string; + style?: string; + unicodeRange?: string; + variant?: string; + weight?: string; } -interface FocusNavigationOrigin { - originHeight?: number; - originLeft?: number; - originTop?: number; - originWidth?: number; +interface FontFaceSetLoadEventInit extends EventInit { + fontfaces?: FontFace[]; } -interface FocusOptions { - preventScroll?: boolean; +interface FormDataEventInit extends EventInit { + formData: FormData; } interface FullscreenOptions { @@ -507,6 +505,10 @@ interface GamepadEventInit extends EventInit { gamepad: Gamepad; } +interface GetAnimationsOptions { + subtree?: boolean; +} + interface GetNotificationOptions { tag?: string; } @@ -522,8 +524,8 @@ interface HashChangeEventInit extends EventInit { interface HkdfParams extends Algorithm { hash: HashAlgorithmIdentifier; - info: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; - salt: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; + info: BufferSource; + salt: BufferSource; } interface HmacImportParams extends Algorithm { @@ -541,6 +543,11 @@ interface HmacKeyGenParams extends Algorithm { length?: number; } +interface IDBDatabaseInfo { + name?: string; + version?: number; +} + interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; @@ -561,6 +568,10 @@ interface IIRFilterOptions extends AudioNodeOptions { feedforward: number[]; } +interface IdleRequestOptions { + timeout?: number; +} + interface ImageBitmapOptions { colorSpaceConversion?: ColorSpaceConversion; imageOrientation?: ImageOrientation; @@ -574,9 +585,8 @@ interface ImageBitmapRenderingContextSettings { alpha?: boolean; } -interface ImageEncodeOptions { - quality?: number; - type?: string; +interface ImageDataSettings { + colorSpace?: PredefinedColorSpace; } interface ImportMeta { @@ -585,8 +595,10 @@ interface ImportMeta { interface InputEventInit extends UIEventInit { data?: string | null; + dataTransfer?: DataTransfer | null; inputType?: string; isComposing?: boolean; + targetRanges?: StaticRange[]; } interface IntersectionObserverEntryInit { @@ -596,7 +608,7 @@ interface IntersectionObserverEntryInit { isIntersecting: boolean; rootBounds: DOMRectInit | null; target: Element; - time: number; + time: DOMHighResTimeStamp; } interface IntersectionObserverInit { @@ -656,17 +668,51 @@ interface KeyframeAnimationOptions extends KeyframeEffectOptions { interface KeyframeEffectOptions extends EffectTiming { composite?: CompositeOperation; iterationComposite?: IterationCompositeOperation; + pseudoElement?: string | null; +} + +interface MediaCapabilitiesDecodingInfo extends MediaCapabilitiesInfo { + configuration?: MediaDecodingConfiguration; +} + +interface MediaCapabilitiesEncodingInfo extends MediaCapabilitiesInfo { + configuration?: MediaEncodingConfiguration; +} + +interface MediaCapabilitiesInfo { + powerEfficient: boolean; + smooth: boolean; + supported: boolean; +} + +interface MediaConfiguration { + audio?: AudioConfiguration; + video?: VideoConfiguration; +} + +interface MediaDecodingConfiguration extends MediaConfiguration { + type: MediaDecodingType; } interface MediaElementAudioSourceOptions { mediaElement: HTMLMediaElement; } +interface MediaEncodingConfiguration extends MediaConfiguration { + type: MediaEncodingType; +} + interface MediaEncryptedEventInit extends EventInit { initData?: ArrayBuffer | null; initDataType?: string; } +interface MediaImage { + sizes?: string; + src: string; + type?: string; +} + interface MediaKeyMessageEventInit extends EventInit { message: ArrayBuffer; messageType: MediaKeyMessageType; @@ -684,34 +730,54 @@ interface MediaKeySystemConfiguration { interface MediaKeySystemMediaCapability { contentType?: string; + encryptionScheme?: string | null; robustness?: string; } +interface MediaMetadataInit { + album?: string; + artist?: string; + artwork?: MediaImage[]; + title?: string; +} + +interface MediaPositionState { + duration?: number; + playbackRate?: number; + position?: number; +} + interface MediaQueryListEventInit extends EventInit { matches?: boolean; media?: string; } -interface MediaStreamAudioSourceOptions { - mediaStream: MediaStream; +interface MediaRecorderErrorEventInit extends EventInit { + error: DOMException; } -interface MediaStreamConstraints { - audio?: boolean | MediaTrackConstraints; - peerIdentity?: string; - video?: boolean | MediaTrackConstraints; +interface MediaRecorderOptions { + audioBitsPerSecond?: number; + bitsPerSecond?: number; + mimeType?: string; + videoBitsPerSecond?: number; } -interface MediaStreamErrorEventInit extends EventInit { - error?: MediaStreamError | null; +interface MediaSessionActionDetails { + action: MediaSessionAction; + fastSeek?: boolean | null; + seekOffset?: number | null; + seekTime?: number | null; } -interface MediaStreamEventInit extends EventInit { - stream?: MediaStream; +interface MediaStreamAudioSourceOptions { + mediaStream: MediaStream; } -interface MediaStreamTrackAudioSourceOptions { - mediaStreamTrack: MediaStreamTrack; +interface MediaStreamConstraints { + audio?: boolean | MediaTrackConstraints; + peerIdentity?: string; + video?: boolean | MediaTrackConstraints; } interface MediaStreamTrackEventInit extends EventInit { @@ -722,13 +788,16 @@ interface MediaTrackCapabilities { aspectRatio?: DoubleRange; autoGainControl?: boolean[]; channelCount?: ULongRange; + cursor?: string[]; deviceId?: string; + displaySurface?: string; echoCancellation?: boolean[]; facingMode?: string[]; frameRate?: DoubleRange; groupId?: string; height?: ULongRange; latency?: DoubleRange; + logicalSurface?: boolean; noiseSuppression?: boolean[]; resizeMode?: string[]; sampleRate?: ULongRange; @@ -738,7 +807,6 @@ interface MediaTrackCapabilities { interface MediaTrackConstraintSet { aspectRatio?: ConstrainDouble; - autoGainControl?: ConstrainBoolean; channelCount?: ConstrainULong; deviceId?: ConstrainDOMString; echoCancellation?: ConstrainBoolean; @@ -747,10 +815,9 @@ interface MediaTrackConstraintSet { groupId?: ConstrainDOMString; height?: ConstrainULong; latency?: ConstrainDouble; - noiseSuppression?: ConstrainBoolean; - resizeMode?: ConstrainDOMString; sampleRate?: ConstrainULong; sampleSize?: ConstrainULong; + suppressLocalAudioPlayback?: ConstrainBoolean; width?: ConstrainULong; } @@ -760,17 +827,13 @@ interface MediaTrackConstraints extends MediaTrackConstraintSet { interface MediaTrackSettings { aspectRatio?: number; - autoGainControl?: boolean; - channelCount?: number; deviceId?: string; echoCancellation?: boolean; facingMode?: string; frameRate?: number; groupId?: string; height?: number; - latency?: number; - noiseSuppression?: boolean; - resizeMode?: string; + restrictOwnAudio?: boolean; sampleRate?: number; sampleSize?: number; width?: number; @@ -778,19 +841,15 @@ interface MediaTrackSettings { interface MediaTrackSupportedConstraints { aspectRatio?: boolean; - autoGainControl?: boolean; - channelCount?: boolean; deviceId?: boolean; echoCancellation?: boolean; facingMode?: boolean; frameRate?: boolean; groupId?: boolean; height?: boolean; - latency?: boolean; - noiseSuppression?: boolean; - resizeMode?: boolean; sampleRate?: boolean; sampleSize?: boolean; + suppressLocalAudioPlayback?: boolean; width?: boolean; } @@ -802,11 +861,6 @@ interface MessageEventInit extends EventInit { source?: MessageEventSource | null; } -interface MidiPermissionDescriptor extends PermissionDescriptor { - name: "midi"; - sysex?: boolean; -} - interface MouseEventInit extends EventModifierInit { button?: number; buttons?: number; @@ -854,11 +908,6 @@ interface MutationObserverInit { subtree?: boolean; } -interface NavigationPreloadState { - enabled?: boolean; - headerValue?: string; -} - interface NotificationAction { action: string; icon?: string; @@ -878,7 +927,7 @@ interface NotificationOptions { requireInteraction?: boolean; silent?: boolean; tag?: string; - timestamp?: number; + timestamp?: DOMTimeStamp; vibrate?: VibratePattern; } @@ -901,6 +950,7 @@ interface OptionalEffectTiming { fill?: FillMode; iterationStart?: number; iterations?: number; + playbackRate?: number; } interface OscillatorOptions extends AudioNodeOptions { @@ -931,12 +981,6 @@ interface PannerOptions extends AudioNodeOptions { rolloffFactor?: number; } -interface PayerErrors { - email?: string; - name?: string; - phone?: string; -} - interface PaymentCurrencyAmount { currency: string; value: string; @@ -945,7 +989,6 @@ interface PaymentCurrencyAmount { interface PaymentDetailsBase { displayItems?: PaymentItem[]; modifiers?: PaymentDetailsModifier[]; - shippingOptions?: PaymentShippingOption[]; } interface PaymentDetailsInit extends PaymentDetailsBase { @@ -956,15 +999,12 @@ interface PaymentDetailsInit extends PaymentDetailsBase { interface PaymentDetailsModifier { additionalDisplayItems?: PaymentItem[]; data?: any; - supportedMethods: string | string[]; + supportedMethods: string; total?: PaymentItem; } interface PaymentDetailsUpdate extends PaymentDetailsBase { - error?: string; - payerErrors?: PayerErrors; paymentMethodErrors?: any; - shippingAddressErrors?: AddressErrors; total?: PaymentItem; } @@ -981,39 +1021,33 @@ interface PaymentMethodChangeEventInit extends PaymentRequestUpdateEventInit { interface PaymentMethodData { data?: any; - supportedMethods: string | string[]; -} - -interface PaymentOptions { - requestBillingAddress?: boolean; - requestPayerEmail?: boolean; - requestPayerName?: boolean; - requestPayerPhone?: boolean; - requestShipping?: boolean; - shippingType?: PaymentShippingType; + supportedMethods: string; } interface PaymentRequestUpdateEventInit extends EventInit { } -interface PaymentShippingOption { - amount: PaymentCurrencyAmount; - id: string; - label: string; - selected?: boolean; -} - interface PaymentValidationErrors { error?: string; - payer?: PayerErrors; paymentMethod?: any; - shippingAddress?: AddressErrors; } interface Pbkdf2Params extends Algorithm { hash: HashAlgorithmIdentifier; iterations: number; - salt: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; + salt: BufferSource; +} + +interface PerformanceMarkOptions { + detail?: any; + startTime?: DOMHighResTimeStamp; +} + +interface PerformanceMeasureOptions { + detail?: any; + duration?: DOMHighResTimeStamp; + end?: string | DOMHighResTimeStamp; + start?: string | DOMHighResTimeStamp; } interface PerformanceObserverInit { @@ -1127,14 +1161,9 @@ interface PublicKeyCredentialUserEntity extends PublicKeyCredentialEntity { id: BufferSource; } -interface PushPermissionDescriptor extends PermissionDescriptor { - name: "push"; - userVisibleOnly?: boolean; -} - interface PushSubscriptionJSON { endpoint?: string; - expirationTime?: number | null; + expirationTime?: DOMTimeStamp | null; keys?: Record; } @@ -1161,7 +1190,7 @@ interface RTCAnswerOptions extends RTCOfferAnswerOptions { } interface RTCCertificateExpiration { - expires?: number; + expires?: DOMTimeStamp; } interface RTCConfiguration { @@ -1195,48 +1224,6 @@ interface RTCDtlsFingerprint { value?: string; } -interface RTCDtlsParameters { - fingerprints?: RTCDtlsFingerprint[]; - role?: RTCDtlsRole; -} - -interface RTCErrorEventInit extends EventInit { - error: RTCError; -} - -interface RTCErrorInit { - errorDetail: RTCErrorDetailType; - receivedAlert?: number; - sctpCauseCode?: number; - sdpLineNumber?: number; - sentAlert?: number; -} - -interface RTCIceCandidateAttributes extends RTCStats { - addressSourceUrl?: string; - candidateType?: RTCStatsIceCandidateType; - ipAddress?: string; - portNumber?: number; - priority?: number; - transport?: string; -} - -interface RTCIceCandidateComplete { -} - -interface RTCIceCandidateDictionary { - foundation?: string; - ip?: string; - msMTurnSessionId?: string; - port?: number; - priority?: number; - protocol?: RTCIceProtocol; - relatedAddress?: string; - relatedPort?: number; - tcpType?: RTCIceTcpCandidateType; - type?: RTCIceCandidateType; -} - interface RTCIceCandidateInit { candidate?: string; sdpMLineIndex?: number | null; @@ -1244,54 +1231,22 @@ interface RTCIceCandidateInit { usernameFragment?: string | null; } -interface RTCIceCandidatePair { - local?: RTCIceCandidate; - remote?: RTCIceCandidate; -} - interface RTCIceCandidatePairStats extends RTCStats { availableIncomingBitrate?: number; availableOutgoingBitrate?: number; - bytesDiscardedOnSend?: number; bytesReceived?: number; bytesSent?: number; - circuitBreakerTriggerCount?: number; - consentExpiredTimestamp?: number; - consentRequestsSent?: number; currentRoundTripTime?: number; - currentRtt?: number; - firstRequestTimestamp?: number; - lastPacketReceivedTimestamp?: number; - lastPacketSentTimestamp?: number; - lastRequestTimestamp?: number; - lastResponseTimestamp?: number; - localCandidateId?: string; + localCandidateId: string; nominated?: boolean; - packetsDiscardedOnSend?: number; - packetsReceived?: number; - packetsSent?: number; - priority?: number; - remoteCandidateId?: string; + remoteCandidateId: string; requestsReceived?: number; requestsSent?: number; responsesReceived?: number; responsesSent?: number; - retransmissionsReceived?: number; - retransmissionsSent?: number; - state?: RTCStatsIceCandidatePairState; + state: RTCStatsIceCandidatePairState; totalRoundTripTime?: number; - totalRtt?: number; - transportId?: string; -} - -interface RTCIceGatherOptions { - gatherPolicy?: RTCIceGatherPolicy; - iceservers?: RTCIceServer[]; -} - -interface RTCIceParameters { - password?: string; - usernameFragment?: string; + transportId: string; } interface RTCIceServer { @@ -1301,18 +1256,13 @@ interface RTCIceServer { username?: string; } -interface RTCIdentityProviderOptions { - peerIdentity?: string; - protocol?: string; - usernameHint?: string; -} - -interface RTCInboundRTPStreamStats extends RTCRTPStreamStats { - bytesReceived?: number; - fractionLost?: number; - jitter?: number; - packetsLost?: number; - packetsReceived?: number; +interface RTCInboundRtpStreamStats extends RTCReceivedRtpStreamStats { + firCount?: number; + framesDecoded?: number; + nackCount?: number; + pliCount?: number; + qpSum?: number; + remoteId?: string; } interface RTCLocalSessionDescriptionInit { @@ -1320,23 +1270,6 @@ interface RTCLocalSessionDescriptionInit { type?: RTCSdpType; } -interface RTCMediaStreamTrackStats extends RTCStats { - audioLevel?: number; - echoReturnLoss?: number; - echoReturnLossEnhancement?: number; - frameHeight?: number; - frameWidth?: number; - framesCorrupted?: number; - framesDecoded?: number; - framesDropped?: number; - framesPerSecond?: number; - framesReceived?: number; - framesSent?: number; - remoteSource?: boolean; - ssrcIds?: string[]; - trackIdentifier?: string; -} - interface RTCOfferAnswerOptions { } @@ -1346,18 +1279,20 @@ interface RTCOfferOptions extends RTCOfferAnswerOptions { offerToReceiveVideo?: boolean; } -interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats { - bytesSent?: number; - packetsSent?: number; - roundTripTime?: number; - targetBitrate?: number; +interface RTCOutboundRtpStreamStats extends RTCSentRtpStreamStats { + firCount?: number; + framesEncoded?: number; + nackCount?: number; + pliCount?: number; + qpSum?: number; + remoteId?: string; } interface RTCPeerConnectionIceErrorEventInit extends EventInit { address?: string | null; errorCode: number; + errorText?: string; port?: number | null; - statusText?: string; url?: string; } @@ -1366,23 +1301,11 @@ interface RTCPeerConnectionIceEventInit extends EventInit { url?: string | null; } -interface RTCRTPStreamStats extends RTCStats { - associateStatsId?: string; - codecId?: string; - firCount?: number; - isRemote?: boolean; - mediaTrackId?: string; - mediaType?: string; - nackCount?: number; - pliCount?: number; - sliCount?: number; - ssrc?: string; - transportId?: string; -} - -interface RTCRtcpFeedback { - parameter?: string; - type?: string; +interface RTCReceivedRtpStreamStats extends RTCRtpStreamStats { + jitter?: number; + packetsDiscarded?: number; + packetsLost?: number; + packetsReceived?: number; } interface RTCRtcpParameters { @@ -1418,27 +1341,16 @@ interface RTCRtpContributingSource { audioLevel?: number; rtpTimestamp: number; source: number; - timestamp: number; + timestamp: DOMHighResTimeStamp; } interface RTCRtpEncodingParameters extends RTCRtpCodingParameters { active?: boolean; maxBitrate?: number; + priority?: RTCPriorityType; scaleResolutionDownBy?: number; } -interface RTCRtpFecParameters { - mechanism?: string; - ssrc?: number; -} - -interface RTCRtpHeaderExtension { - kind?: string; - preferredEncrypt?: boolean; - preferredId?: number; - uri?: string; -} - interface RTCRtpHeaderExtensionCapability { uri?: string; } @@ -1458,17 +1370,20 @@ interface RTCRtpParameters { interface RTCRtpReceiveParameters extends RTCRtpParameters { } -interface RTCRtpRtxParameters { - ssrc?: number; -} - interface RTCRtpSendParameters extends RTCRtpParameters { + degradationPreference?: RTCDegradationPreference; encodings: RTCRtpEncodingParameters[]; transactionId: string; } +interface RTCRtpStreamStats extends RTCStats { + codecId?: string; + kind: string; + ssrc: number; + transportId?: string; +} + interface RTCRtpSynchronizationSource extends RTCRtpContributingSource { - voiceActivityFlag?: boolean; } interface RTCRtpTransceiverInit { @@ -1477,10 +1392,9 @@ interface RTCRtpTransceiverInit { streams?: MediaStream[]; } -interface RTCRtpUnhandled { - muxId?: string; - payloadType?: number; - ssrc?: number; +interface RTCSentRtpStreamStats extends RTCRtpStreamStats { + bytesSent?: number; + packetsSent?: number; } interface RTCSessionDescriptionInit { @@ -1488,33 +1402,10 @@ interface RTCSessionDescriptionInit { type: RTCSdpType; } -interface RTCSrtpKeyParam { - keyMethod?: string; - keySalt?: string; - lifetime?: string; - mkiLength?: number; - mkiValue?: number; -} - -interface RTCSrtpSdesParameters { - cryptoSuite?: string; - keyParams?: RTCSrtpKeyParam[]; - sessionParams?: string[]; - tag?: number; -} - -interface RTCSsrcRange { - max?: number; - min?: number; -} - interface RTCStats { - id?: string; - timestamp?: number; - type?: RTCStatsType; -} - -interface RTCStatsReport { + id: string; + timestamp: DOMHighResTimeStamp; + type: RTCStatsType; } interface RTCTrackEventInit extends EventInit { @@ -1528,17 +1419,12 @@ interface RTCTransportStats extends RTCStats { bytesReceived?: number; bytesSent?: number; dtlsCipher?: string; - dtlsState?: RTCDtlsTransportState; - iceRole?: RTCIceRole; + dtlsState: RTCDtlsTransportState; localCertificateId?: string; - packetsReceived?: number; - packetsSent?: number; remoteCertificateId?: string; rtcpTransportStatsId?: string; - selectedCandidatePairChanges?: number; selectedCandidatePairId?: string; srtpCipher?: string; - tlsGroup?: string; tlsVersion?: string; } @@ -1656,7 +1542,7 @@ interface RsaKeyGenParams extends Algorithm { } interface RsaOaepParams extends Algorithm { - label?: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; + label?: BufferSource; } interface RsaOtherPrimesInfo { @@ -1693,22 +1579,26 @@ interface ScrollToOptions extends ScrollOptions { interface SecurityPolicyViolationEventInit extends EventInit { blockedURI?: string; columnNumber?: number; - documentURI?: string; - effectiveDirective?: string; + disposition: SecurityPolicyViolationEventDisposition; + documentURI: string; + effectiveDirective: string; lineNumber?: number; - originalPolicy?: string; + originalPolicy: string; referrer?: string; + sample?: string; sourceFile?: string; - statusCode?: number; - violatedDirective?: string; + statusCode: number; + violatedDirective: string; } interface ShadowRootInit { - delegatesFocus?: boolean; + delegatesFocus: boolean; mode: ShadowRootMode; + slotAssignment?: SlotAssignmentMode; } interface ShareData { + files?: File[]; text?: string; title?: string; url?: string; @@ -1719,11 +1609,6 @@ interface SpeechRecognitionErrorEventInit extends EventInit { message?: string; } -interface SpeechRecognitionEventInit extends EventInit { - resultIndex?: number; - results: SpeechRecognitionResultList; -} - interface SpeechSynthesisErrorEventInit extends SpeechSynthesisEventInit { error: SpeechSynthesisErrorCode; } @@ -1760,16 +1645,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 StreamPipeOptions { preventAbort?: boolean; preventCancel?: boolean; @@ -1794,6 +1669,10 @@ interface StreamPipeOptions { signal?: AbortSignal; } +interface SubmitEventInit extends EventInit { + submitter?: HTMLElement | null; +} + interface TextDecodeOptions { stream?: boolean; } @@ -1853,6 +1732,8 @@ interface TransitionEventInit extends EventInit { interface UIEventInit extends EventInit { detail?: number; view?: Window | null; + /** @deprecated */ + which?: number; } interface ULongRange { @@ -1875,21 +1756,16 @@ interface UnderlyingSource { type?: undefined; } -interface VRDisplayEventInit extends EventInit { - display: VRDisplay; - reason?: VRDisplayEventReason; -} - -interface VRLayer { - leftBounds?: number[] | Float32Array | null; - rightBounds?: number[] | Float32Array | null; - source?: HTMLCanvasElement | null; -} - -interface VRStageParameters { - sittingToStandingTransform?: Float32Array; - sizeX?: number; - sizeY?: number; +interface VideoConfiguration { + bitrate: number; + colorGamut?: ColorGamut; + contentType: string; + framerate: number; + hdrMetadataType?: HdrMetadataType; + height: number; + scalabilityMode?: string; + transferFunction?: TransferFunction; + width: number; } interface WaveShaperOptions extends AudioNodeOptions { @@ -1920,6 +1796,10 @@ interface WheelEventInit extends MouseEventInit { deltaZ?: number; } +interface WindowPostMessageOptions extends PostMessageOptions { + targetOrigin?: string; +} + interface WorkerOptions { credentials?: RequestCredentials; name?: string; @@ -1930,9 +1810,26 @@ interface WorkletOptions { credentials?: RequestCredentials; } -interface EventListener { - (evt: Event): void; -} +type NodeFilter = ((node: Node) => number) | { acceptNode(node: Node): number; }; + +declare var NodeFilter: { + readonly FILTER_ACCEPT: number; + readonly FILTER_REJECT: number; + readonly FILTER_SKIP: number; + readonly SHOW_ALL: number; + readonly SHOW_ATTRIBUTE: number; + readonly SHOW_CDATA_SECTION: number; + readonly SHOW_COMMENT: number; + readonly SHOW_DOCUMENT: number; + readonly SHOW_DOCUMENT_FRAGMENT: number; + readonly SHOW_DOCUMENT_TYPE: number; + readonly SHOW_ELEMENT: number; + readonly SHOW_ENTITY: number; + readonly SHOW_ENTITY_REFERENCE: number; + readonly SHOW_NOTATION: number; + readonly SHOW_PROCESSING_INSTRUCTION: number; + readonly SHOW_TEXT: number; +}; type XPathNSResolver = ((prefix: string | null) => string | null) | { lookupNamespaceURI(prefix: string | null): string | null; }; @@ -1944,6 +1841,45 @@ interface ANGLE_instanced_arrays { readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: GLenum; } +interface ARIAMixin { + ariaAtomic: string; + ariaAutoComplete: string; + ariaBusy: string; + ariaChecked: string; + ariaColCount: string; + ariaColIndex: string; + ariaColSpan: string; + ariaCurrent: string; + ariaDisabled: string; + ariaExpanded: string; + ariaHasPopup: string; + ariaHidden: string; + ariaKeyShortcuts: string; + ariaLabel: string; + ariaLevel: string; + ariaLive: string; + ariaModal: string; + ariaMultiLine: string; + ariaMultiSelectable: string; + ariaOrientation: string; + ariaPlaceholder: string; + ariaPosInSet: string; + ariaPressed: string; + ariaReadOnly: string; + ariaRequired: string; + ariaRoleDescription: string; + ariaRowCount: string; + ariaRowIndex: string; + ariaRowSpan: string; + ariaSelected: string; + ariaSetSize: string; + ariaSort: string; + ariaValueMax: string; + ariaValueMin: string; + ariaValueNow: string; + ariaValueText: string; +} + /** A controller object that allows you to abort one or more DOM requests as and when desired. */ interface AbortController { /** @@ -1981,6 +1917,7 @@ interface AbortSignal extends EventTarget { declare var AbortSignal: { prototype: AbortSignal; new(): AbortSignal; + abort(): AbortSignal; }; interface AbstractRange { @@ -2023,14 +1960,6 @@ interface AbstractWorker { removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } -interface AesCfbParams extends Algorithm { - iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; -} - -interface AesCmacParams extends Algorithm { - length: number; -} - /** A node able to provide real-time frequency and time-domain analysis information. It is an AudioNode that passes the audio stream unchanged from the input to the output, but allows you to take the generated data, process it, and create audio visualizations. */ interface AnalyserNode extends AudioNode { fftSize: number; @@ -2051,12 +1980,13 @@ declare var AnalyserNode: { interface Animatable { animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation; - getAnimations(): Animation[]; + getAnimations(options?: GetAnimationsOptions): Animation[]; } interface AnimationEventMap { "cancel": AnimationPlaybackEvent; "finish": AnimationPlaybackEvent; + "remove": Event; } interface Animation extends EventTarget { @@ -2066,15 +1996,19 @@ interface Animation extends EventTarget { id: string; oncancel: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null; onfinish: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null; + onremove: ((this: Animation, ev: Event) => any) | null; readonly pending: boolean; readonly playState: AnimationPlayState; playbackRate: number; readonly ready: Promise; + readonly replaceState: AnimationReplaceState; startTime: number | null; timeline: AnimationTimeline | null; cancel(): void; + commitStyles(): void; finish(): void; pause(): void; + persist(): void; play(): void; reverse(): void; updatePlaybackRate(playbackRate: number): void; @@ -2136,65 +2070,6 @@ declare var AnimationTimeline: { new(): AnimationTimeline; }; -interface ApplicationCacheEventMap { - "cached": Event; - "checking": Event; - "downloading": Event; - "error": Event; - "noupdate": Event; - "obsolete": Event; - "progress": ProgressEvent; - "updateready": Event; -} - -interface ApplicationCache extends EventTarget { - /** @deprecated */ - oncached: ((this: ApplicationCache, ev: Event) => any) | null; - /** @deprecated */ - onchecking: ((this: ApplicationCache, ev: Event) => any) | null; - /** @deprecated */ - ondownloading: ((this: ApplicationCache, ev: Event) => any) | null; - /** @deprecated */ - onerror: ((this: ApplicationCache, ev: Event) => any) | null; - /** @deprecated */ - onnoupdate: ((this: ApplicationCache, ev: Event) => any) | null; - /** @deprecated */ - onobsolete: ((this: ApplicationCache, ev: Event) => any) | null; - /** @deprecated */ - onprogress: ((this: ApplicationCache, ev: ProgressEvent) => any) | null; - /** @deprecated */ - onupdateready: ((this: ApplicationCache, ev: Event) => any) | null; - /** @deprecated */ - readonly status: number; - /** @deprecated */ - abort(): void; - /** @deprecated */ - swapCache(): void; - /** @deprecated */ - update(): void; - readonly CHECKING: number; - readonly DOWNLOADING: number; - readonly IDLE: number; - readonly OBSOLETE: number; - readonly UNCACHED: number; - readonly UPDATEREADY: number; - addEventListener(type: K, listener: (this: ApplicationCache, ev: ApplicationCacheEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: ApplicationCache, ev: ApplicationCacheEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; -} - -declare var ApplicationCache: { - prototype: ApplicationCache; - new(): ApplicationCache; - readonly CHECKING: number; - readonly DOWNLOADING: number; - readonly IDLE: number; - readonly OBSOLETE: number; - readonly UNCACHED: number; - readonly UPDATEREADY: number; -}; - /** A DOM element's attribute as an object. In most DOM methods, you will probably directly retrieve the attribute as a string (e.g., Element.getAttribute(), but certain functions (e.g., Element.getAttributeNode()) or means of iterating give Attr types. */ interface Attr extends Node { readonly localName: string; @@ -2251,12 +2126,10 @@ declare var AudioBufferSourceNode: { /** An audio-processing graph built from audio modules linked together, each represented by an AudioNode. */ interface AudioContext extends BaseAudioContext { readonly baseLatency: number; - readonly outputLatency: number; close(): Promise; createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode; createMediaStreamDestination(): MediaStreamAudioDestinationNode; createMediaStreamSource(mediaStream: MediaStream): MediaStreamAudioSourceNode; - createMediaStreamTrackSource(mediaStreamTrack: MediaStreamTrack): MediaStreamTrackAudioSourceNode; getOutputTimestamp(): AudioTimestamp; resume(): Promise; suspend(): Promise; @@ -2358,14 +2231,17 @@ declare var AudioParamMap: { }; /** The Web Audio API events that occur when a ScriptProcessorNode input buffer is ready to be processed. - * @deprecated As of the August 29 2014 Web Audio API spec publication, this feature has been marked as deprecated, and is soon to be replaced by AudioWorklet. - */ + * @deprecated As of the August 29 2014 Web Audio API spec publication, this feature has been marked as deprecated, and is soon to be replaced by AudioWorklet. */ interface AudioProcessingEvent extends Event { + /** @deprecated */ readonly inputBuffer: AudioBuffer; + /** @deprecated */ readonly outputBuffer: AudioBuffer; + /** @deprecated */ readonly playbackTime: number; } +/** @deprecated */ declare var AudioProcessingEvent: { prototype: AudioProcessingEvent; new(type: string, eventInitDict: AudioProcessingEventInit): AudioProcessingEvent; @@ -2482,6 +2358,7 @@ interface BaseAudioContext extends EventTarget { createOscillator(): OscillatorNode; createPanner(): PannerNode; createPeriodicWave(real: number[] | Float32Array, imag: number[] | Float32Array, constraints?: PeriodicWaveConstraints): PeriodicWave; + /** @deprecated */ createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode; createStereoPanner(): StereoPannerNode; createWaveShaper(): WaveShaperNode; @@ -2507,28 +2384,6 @@ declare var BeforeUnloadEvent: { new(): BeforeUnloadEvent; }; -interface BhxBrowser { - readonly lastError: DOMException; - checkMatchesGlobExpression(pattern: string, value: string): boolean; - checkMatchesUriExpression(pattern: string, value: string): boolean; - clearLastError(): void; - currentWindowId(): number; - fireExtensionApiTelemetry(functionName: string, isSucceeded: boolean, isSupported: boolean, errorString: string): void; - genericFunction(functionId: number, destination: any, parameters?: string, callbackId?: number): void; - genericSynchronousFunction(functionId: number, parameters?: string): string; - getExtensionId(): string; - getThisAddress(): any; - registerGenericFunctionCallbackHandler(callbackHandler: Function): void; - registerGenericListenerHandler(eventHandler: Function): void; - setLastError(parameters: string): void; - webPlatformGenericFunction(destination: any, parameters?: string, callbackId?: number): void; -} - -declare var BhxBrowser: { - prototype: BhxBrowser; - new(): BhxBrowser; -}; - /** A simple low-order filter, and is created using the AudioContext.createBiquadFilter() method. It is an AudioNode that can represent different kinds of filters, tone control devices, and graphic equalizers. */ interface BiquadFilterNode extends AudioNode { readonly Q: AudioParam; @@ -2559,6 +2414,16 @@ declare var Blob: { new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob; }; +interface BlobEvent extends Event { + readonly data: Blob; + readonly timecode: DOMHighResTimeStamp; +} + +declare var BlobEvent: { + prototype: BlobEvent; + new(type: string, eventInitDict: BlobEventInit): BlobEvent; +}; + interface Body { readonly body: ReadableStream | null; readonly bodyUsed: boolean; @@ -2620,6 +2485,19 @@ declare var CDATASection: { new(): CDATASection; }; +interface CSSAnimation extends Animation { + readonly animationName: string; + addEventListener(type: K, listener: (this: CSSAnimation, ev: AnimationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: CSSAnimation, ev: AnimationEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var CSSAnimation: { + prototype: CSSAnimation; + new(): CSSAnimation; +}; + /** A single condition CSS at-rule, which consists of a condition and a statement block. It is a child of CSSGroupingRule. */ interface CSSConditionRule extends CSSGroupingRule { conditionText: string; @@ -2630,6 +2508,25 @@ declare var CSSConditionRule: { new(): CSSConditionRule; }; +interface CSSCounterStyleRule extends CSSRule { + additiveSymbols: string; + fallback: string; + name: string; + negative: string; + pad: string; + prefix: string; + range: string; + speakAs: string; + suffix: string; + symbols: string; + system: string; +} + +declare var CSSCounterStyleRule: { + prototype: CSSCounterStyleRule; + new(): CSSCounterStyleRule; +}; + interface CSSFontFaceRule extends CSSRule { readonly style: CSSStyleDeclaration; } @@ -2724,6 +2621,7 @@ interface CSSRule { cssText: string; readonly parentRule: CSSRule | null; readonly parentStyleSheet: CSSStyleSheet | null; + /** @deprecated */ readonly type: number; readonly CHARSET_RULE: number; readonly FONT_FACE_RULE: number; @@ -2780,9 +2678,12 @@ interface CSSStyleDeclaration { animationName: string; animationPlayState: string; animationTimingFunction: string; + appearance: string; + aspectRatio: string; backfaceVisibility: string; background: string; backgroundAttachment: string; + backgroundBlendMode: string; backgroundClip: string; backgroundColor: string; backgroundImage: string; @@ -2795,6 +2696,8 @@ interface CSSStyleDeclaration { baselineShift: string; blockSize: string; border: string; + borderBlock: string; + borderBlockColor: string; borderBlockEnd: string; borderBlockEndColor: string; borderBlockEndStyle: string; @@ -2803,6 +2706,8 @@ interface CSSStyleDeclaration { borderBlockStartColor: string; borderBlockStartStyle: string; borderBlockStartWidth: string; + borderBlockStyle: string; + borderBlockWidth: string; borderBottom: string; borderBottomColor: string; borderBottomLeftRadius: string; @@ -2811,12 +2716,16 @@ interface CSSStyleDeclaration { borderBottomWidth: string; borderCollapse: string; borderColor: string; + borderEndEndRadius: string; + borderEndStartRadius: string; borderImage: string; borderImageOutset: string; borderImageRepeat: string; borderImageSlice: string; borderImageSource: string; borderImageWidth: string; + borderInline: string; + borderInlineColor: string; borderInlineEnd: string; borderInlineEndColor: string; borderInlineEndStyle: string; @@ -2825,6 +2734,8 @@ interface CSSStyleDeclaration { borderInlineStartColor: string; borderInlineStartStyle: string; borderInlineStartWidth: string; + borderInlineStyle: string; + borderInlineWidth: string; borderLeft: string; borderLeftColor: string; borderLeftStyle: string; @@ -2835,6 +2746,8 @@ interface CSSStyleDeclaration { borderRightStyle: string; borderRightWidth: string; borderSpacing: string; + borderStartEndRadius: string; + borderStartStartRadius: string; borderStyle: string; borderTop: string; borderTopColor: string; @@ -2858,6 +2771,7 @@ interface CSSStyleDeclaration { color: string; colorInterpolation: string; colorInterpolationFilters: string; + colorScheme: string; columnCount: string; columnFill: string; columnGap: string; @@ -2868,9 +2782,11 @@ interface CSSStyleDeclaration { columnSpan: string; columnWidth: string; columns: string; + contain: string; content: string; counterIncrement: string; counterReset: string; + counterSet: string; cssFloat: string; cssText: string; cursor: string; @@ -2896,20 +2812,22 @@ interface CSSStyleDeclaration { fontFamily: string; fontFeatureSettings: string; fontKerning: string; + fontOpticalSizing: string; fontSize: string; fontSizeAdjust: string; fontStretch: string; fontStyle: string; fontSynthesis: string; fontVariant: string; + fontVariantAlternates: string; fontVariantCaps: string; fontVariantEastAsian: string; fontVariantLigatures: string; fontVariantNumeric: string; fontVariantPosition: string; + fontVariationSettings: string; fontWeight: string; gap: string; - glyphOrientationVertical: string; grid: string; gridArea: string; gridAutoColumns: string; @@ -2930,9 +2848,18 @@ interface CSSStyleDeclaration { gridTemplateRows: string; height: string; hyphens: string; + /** @deprecated */ imageOrientation: string; imageRendering: string; inlineSize: string; + inset: string; + insetBlock: string; + insetBlockEnd: string; + insetBlockStart: string; + insetInline: string; + insetInlineEnd: string; + insetInlineStart: string; + isolation: string; justifyContent: string; justifyItems: string; justifySelf: string; @@ -2947,9 +2874,11 @@ interface CSSStyleDeclaration { listStylePosition: string; listStyleType: string; margin: string; + marginBlock: string; marginBlockEnd: string; marginBlockStart: string; marginBottom: string; + marginInline: string; marginInlineEnd: string; marginInlineStart: string; marginLeft: string; @@ -2960,11 +2889,6 @@ interface CSSStyleDeclaration { markerMid: string; markerStart: string; mask: string; - maskComposite: string; - maskImage: string; - maskPosition: string; - maskRepeat: string; - maskSize: string; maskType: string; maxBlockSize: string; maxHeight: string; @@ -2974,8 +2898,14 @@ interface CSSStyleDeclaration { minHeight: string; minInlineSize: string; minWidth: string; + mixBlendMode: string; objectFit: string; objectPosition: string; + offset: string; + offsetAnchor: string; + offsetDistance: string; + offsetPath: string; + offsetRotate: string; opacity: string; order: string; orphans: string; @@ -2995,9 +2925,11 @@ interface CSSStyleDeclaration { overscrollBehaviorX: string; overscrollBehaviorY: string; padding: string; + paddingBlock: string; paddingBlockEnd: string; paddingBlockStart: string; paddingBottom: string; + paddingInline: string; paddingInlineEnd: string; paddingInlineStart: string; paddingLeft: string; @@ -3020,10 +2952,37 @@ interface CSSStyleDeclaration { right: string; rotate: string; rowGap: string; - rubyAlign: string; rubyPosition: string; scale: string; scrollBehavior: string; + scrollMargin: string; + scrollMarginBlock: string; + scrollMarginBlockEnd: string; + scrollMarginBlockStart: string; + scrollMarginBottom: string; + scrollMarginInline: string; + scrollMarginInlineEnd: string; + scrollMarginInlineStart: string; + scrollMarginLeft: string; + scrollMarginRight: string; + scrollMarginTop: string; + scrollPadding: string; + scrollPaddingBlock: string; + scrollPaddingBlockEnd: string; + scrollPaddingBlockStart: string; + scrollPaddingBottom: string; + scrollPaddingInline: string; + scrollPaddingInlineEnd: string; + scrollPaddingInlineStart: string; + scrollPaddingLeft: string; + scrollPaddingRight: string; + scrollPaddingTop: string; + scrollSnapAlign: string; + scrollSnapStop: string; + scrollSnapType: string; + shapeImageThreshold: string; + shapeMargin: string; + shapeOutside: string; shapeRendering: string; stopColor: string; stopOpacity: string; @@ -3044,18 +3003,20 @@ interface CSSStyleDeclaration { textDecoration: string; textDecorationColor: string; textDecorationLine: string; + textDecorationSkipInk: string; textDecorationStyle: string; + textDecorationThickness: string; textEmphasis: string; textEmphasisColor: string; textEmphasisPosition: string; textEmphasisStyle: string; textIndent: string; - textJustify: string; textOrientation: string; textOverflow: string; textRendering: string; textShadow: string; textTransform: string; + textUnderlineOffset: string; textUnderlinePosition: string; top: string; touchAction: string; @@ -3184,7 +3145,6 @@ interface CSSStyleDeclaration { webkitPerspective: string; /** @deprecated */ webkitPerspectiveOrigin: string; - webkitTapHighlightColor: string; /** @deprecated */ webkitTextFillColor: string; /** @deprecated */ @@ -3219,11 +3179,10 @@ interface CSSStyleDeclaration { willChange: string; wordBreak: string; wordSpacing: string; + /** @deprecated */ wordWrap: string; writingMode: string; zIndex: string; - /** @deprecated */ - zoom: string; getPropertyPriority(property: string): string; getPropertyValue(property: string): string; item(index: number): string; @@ -3252,16 +3211,19 @@ declare var CSSStyleRule: { interface CSSStyleSheet extends StyleSheet { readonly cssRules: CSSRuleList; readonly ownerRule: CSSRule | null; + /** @deprecated */ readonly rules: CSSRuleList; + /** @deprecated */ addRule(selector?: string, style?: string, index?: number): number; deleteRule(index: number): void; insertRule(rule: string, index?: number): number; + /** @deprecated */ removeRule(index?: number): void; } declare var CSSStyleSheet: { prototype: CSSStyleSheet; - new(): CSSStyleSheet; + new(options?: CSSStyleSheetInit): CSSStyleSheet; }; /** An object representing a single CSS @supports at-rule. It implements the CSSConditionRule interface, and therefore the CSSRule and CSSGroupingRule interfaces with a type value of 12 (CSSRule.SUPPORTS_RULE). */ @@ -3273,6 +3235,19 @@ declare var CSSSupportsRule: { new(): CSSSupportsRule; }; +interface CSSTransition extends Animation { + readonly transitionProperty: string; + addEventListener(type: K, listener: (this: CSSTransition, ev: AnimationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: CSSTransition, ev: AnimationEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var CSSTransition: { + prototype: CSSTransition; + new(): CSSTransition; +}; + /** Provides a storage mechanism for Request / Response object pairs that are cached, for example as part of the ServiceWorker life cycle. Note that the Cache interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec. */ interface Cache { add(request: RequestInfo): Promise; @@ -3356,9 +3331,9 @@ declare var CanvasGradient: { }; interface CanvasImageData { - createImageData(sw: number, sh: number): ImageData; + createImageData(sw: number, sh: number, settings?: ImageDataSettings): ImageData; createImageData(imagedata: ImageData): ImageData; - getImageData(sx: number, sy: number, sw: number, sh: number): ImageData; + getImageData(sx: number, sy: number, sw: number, sh: number, settings?: ImageDataSettings): ImageData; putImageData(imagedata: ImageData, dx: number, dy: number): void; putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX: number, dirtyY: number, dirtyWidth: number, dirtyHeight: number): void; } @@ -3369,11 +3344,11 @@ interface CanvasImageSmoothing { } interface CanvasPath { - arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void; + arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void; arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void; bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; closePath(): void; - ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void; + ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void; lineTo(x: number, y: number): void; moveTo(x: number, y: number): void; quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; @@ -3412,6 +3387,7 @@ interface CanvasRect { /** The CanvasRenderingContext2D interface, part of the Canvas API, provides the 2D rendering context for the drawing surface of a element. It is used for drawing shapes, text, images, and other objects. */ interface CanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform, CanvasUserInterface { readonly canvas: HTMLCanvasElement; + getContextAttributes(): CanvasRenderingContext2DSettings; } declare var CanvasRenderingContext2D: { @@ -3458,21 +3434,8 @@ interface CanvasTransform { interface CanvasUserInterface { drawFocusIfNeeded(element: Element): void; drawFocusIfNeeded(path: Path2D, element: Element): void; - scrollPathIntoView(): void; - scrollPathIntoView(path: Path2D): void; -} - -interface CaretPosition { - readonly offset: number; - readonly offsetNode: Node; - getClientRect(): DOMRect | null; } -declare var CaretPosition: { - prototype: CaretPosition; - new(): CaretPosition; -}; - /** The ChannelMergerNode interface, often used in conjunction with its opposite, ChannelSplitterNode, reunites different mono inputs into a single output. Each input is used to fill a channel of the output. This is useful for accessing each channels separately, e.g. for performing channel mixing where gain must be separately controlled on each channel. */ interface ChannelMergerNode extends AudioNode { } @@ -3508,7 +3471,7 @@ declare var CharacterData: { new(): CharacterData; }; -interface ChildNode extends Node { +interface ChildNode { /** * Inserts nodes just after node, while replacing strings in nodes with equivalent Text nodes. * @@ -3533,33 +3496,14 @@ interface ChildNode extends Node { replaceWith(...nodes: (Node | string)[]): void; } -interface ClientRect { - bottom: number; - readonly height: number; - left: number; - right: number; - top: number; - readonly width: number; -} - -declare var ClientRect: { - prototype: ClientRect; - new(): ClientRect; -}; - -interface ClientRectList { - readonly length: number; - item(index: number): ClientRect; - [index: number]: ClientRect; +/** @deprecated */ +interface ClientRect extends DOMRect { } -declare var ClientRectList: { - prototype: ClientRectList; - new(): ClientRectList; -}; - interface Clipboard extends EventTarget { + read(): Promise; readText(): Promise; + write(data: ClipboardItems): Promise; writeText(data: string): Promise; } @@ -3578,6 +3522,16 @@ declare var ClipboardEvent: { new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent; }; +interface ClipboardItem { + readonly types: ReadonlyArray; + getType(type: string): Promise; +} + +declare var ClipboardItem: { + prototype: ClipboardItem; + new(items: Record, options?: ClipboardItemOptions): ClipboardItem; +}; + /** A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute. */ interface CloseEvent extends Event { /** @@ -3611,6 +3565,8 @@ declare var Comment: { /** The DOM CompositionEvent represents events that occur due to the user indirectly entering text. */ interface CompositionEvent extends UIEvent { readonly data: string; + /** @deprecated */ + initCompositionEvent(typeArg: string, bubblesArg?: boolean, cancelableArg?: boolean, viewArg?: WindowProxy | null, dataArg?: string): void; } declare var CompositionEvent: { @@ -3618,15 +3574,6 @@ declare var CompositionEvent: { new(type: string, eventInitDict?: CompositionEventInit): CompositionEvent; }; -interface ConcatParams extends Algorithm { - algorithmId: Uint8Array; - hash?: string | Algorithm; - partyUInfo: Uint8Array; - partyVInfo: Uint8Array; - privateInfo?: Uint8Array; - publicInfo?: Uint8Array; -} - interface ConstantSourceNode extends AudioScheduledSourceNode { readonly offset: AudioParam; addEventListener(type: K, listener: (this: ConstantSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -3687,7 +3634,7 @@ declare var CredentialsContainer: { /** Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives. */ interface Crypto { readonly subtle: SubtleCrypto; - getRandomValues(array: T): T; + getRandomValues(array: T): T; } declare var Crypto: { @@ -3708,22 +3655,11 @@ declare var CryptoKey: { new(): CryptoKey; }; -/** The CryptoKeyPair dictionary of the Web Crypto API represents a key pair for an asymmetric cryptography algorithm, also known as a public-key algorithm. */ -interface CryptoKeyPair { - privateKey: CryptoKey; - publicKey: CryptoKey; -} - -declare var CryptoKeyPair: { - prototype: CryptoKeyPair; - new(): CryptoKeyPair; -}; - interface CustomElementRegistry { define(name: string, constructor: CustomElementConstructor, options?: ElementDefinitionOptions): void; - get(name: string): any; + get(name: string): CustomElementConstructor | undefined; upgrade(root: Node): void; - whenDefined(name: string): Promise; + whenDefined(name: string): Promise; } declare var CustomElementRegistry: { @@ -3736,23 +3672,13 @@ interface CustomEvent extends Event { * Returns any custom data event was created with. Typically used for synthetic events. */ readonly detail: T; - initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: T): void; + /** @deprecated */ + initCustomEvent(type: string, bubbles?: boolean, cancelable?: boolean, detail?: T): void; } declare var CustomEvent: { prototype: CustomEvent; - new(typeArg: string, eventInitDict?: CustomEventInit): CustomEvent; -}; - -/** An error object that contains an error name. */ -interface DOMError { - readonly name: string; - toString(): string; -} - -declare var DOMError: { - prototype: DOMError; - new(): DOMError; + new(type: string, eventInitDict?: CustomEventInit): CustomEvent; }; /** An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. */ @@ -3832,28 +3758,6 @@ declare var DOMImplementation: { }; interface DOMMatrix extends DOMMatrixReadOnly { - a: number; - b: number; - c: number; - d: number; - e: number; - f: number; - m11: number; - m12: number; - m13: number; - m14: number; - m21: number; - m22: number; - m23: number; - m24: number; - m31: number; - m32: number; - m33: number; - m34: number; - m41: number; - m42: number; - m43: number; - m44: number; invertSelf(): DOMMatrix; multiplySelf(other?: DOMMatrixInit): DOMMatrix; preMultiplySelf(other?: DOMMatrixInit): DOMMatrix; @@ -3957,10 +3861,6 @@ declare var DOMParser: { }; interface DOMPoint extends DOMPointReadOnly { - w: number; - x: number; - y: number; - z: number; } declare var DOMPoint: { @@ -4004,10 +3904,6 @@ declare var DOMQuad: { }; interface DOMRect extends DOMRectReadOnly { - height: number; - width: number; - x: number; - y: number; } declare var DOMRect: { @@ -4048,15 +3944,6 @@ declare var DOMRectReadOnly: { fromRect(other?: DOMRectInit): DOMRectReadOnly; }; -interface DOMSettableTokenList extends DOMTokenList { - value: string; -} - -declare var DOMSettableTokenList: { - prototype: DOMSettableTokenList; - new(): DOMSettableTokenList; -}; - /** A type returned by some APIs which contains a list of DOMString (strings). */ interface DOMStringList { /** @@ -4135,7 +4022,7 @@ interface DOMTokenList { * * Throws an "InvalidCharacterError" DOMException if one of the arguments contains any ASCII whitespace. */ - replace(oldToken: string, newToken: string): void; + replace(token: string, newToken: string): boolean; /** * Returns true if token is in the associated attribute's supported tokens. Returns false otherwise. * @@ -4161,19 +4048,6 @@ declare var DOMTokenList: { new(): DOMTokenList; }; -interface DataCue extends TextTrackCue { - data: ArrayBuffer; - addEventListener(type: K, listener: (this: DataCue, ev: TextTrackCueEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: DataCue, ev: TextTrackCueEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; -} - -declare var DataCue: { - prototype: DataCue; - new(): DataCue; -}; - /** Used to hold the data that is being dragged during a drag and drop operation. It may hold one or more data items, each of one or more data types. For more information about drag and drop, see HTML Drag and Drop API. */ interface DataTransfer { /** @@ -4245,7 +4119,7 @@ interface DataTransferItem { * Invokes the callback with the string data as the argument, if the drag data item kind is text. */ getAsString(callback: FunctionStringCallback | null): void; - webkitGetAsEntry(): any; + webkitGetAsEntry(): FileSystemEntry | null; } declare var DataTransferItem: { @@ -4268,12 +4142,11 @@ interface DataTransferItemList { * Removes all the entries in the drag data store. */ clear(): void; - item(index: number): DataTransferItem; /** * Removes the indexth entry in the drag data store. */ remove(index: number): void; - [name: number]: DataTransferItem; + [index: number]: DataTransferItem; } declare var DataTransferItemList: { @@ -4281,19 +4154,6 @@ declare var DataTransferItemList: { new(): DataTransferItemList; }; -interface DeferredPermissionRequest { - readonly id: number; - readonly type: MSWebViewPermissionType; - readonly uri: string; - allow(): void; - deny(): void; -} - -declare var DeferredPermissionRequest: { - prototype: DeferredPermissionRequest; - new(): DeferredPermissionRequest; -}; - /** A delay-line; an AudioNode audio-processing module that causes a delay between the arrival of an input data and its propagation to the output. */ interface DelayNode extends AudioNode { readonly delayTime: AudioParam; @@ -4304,18 +4164,6 @@ declare var DelayNode: { new(context: BaseAudioContext, options?: DelayOptions): DelayNode; }; -/** Provides information about the amount of acceleration the device is experiencing along all three axes. */ -interface DeviceAcceleration { - readonly x: number | null; - readonly y: number | null; - readonly z: number | null; -} - -declare var DeviceAcceleration: { - prototype: DeviceAcceleration; - new(): DeviceAcceleration; -}; - /** The DeviceMotionEvent provides web developers with information about the speed of changes for the device's position and orientation. */ interface DeviceMotionEvent extends Event { readonly acceleration: DeviceMotionEventAcceleration | null; @@ -4327,7 +4175,6 @@ interface DeviceMotionEvent extends Event { declare var DeviceMotionEvent: { prototype: DeviceMotionEvent; new(type: string, eventInitDict?: DeviceMotionEventInit): DeviceMotionEvent; - requestPermission(): Promise; }; interface DeviceMotionEventAcceleration { @@ -4353,41 +4200,9 @@ interface DeviceOrientationEvent extends Event { declare var DeviceOrientationEvent: { prototype: DeviceOrientationEvent; new(type: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent; - requestPermission(): Promise; -}; - -/** Provides information about the rate at which the device is rotating around all three axes. */ -interface DeviceRotationRate { - readonly alpha: number | null; - readonly beta: number | null; - readonly gamma: number | null; -} - -declare var DeviceRotationRate: { - prototype: DeviceRotationRate; - new(): DeviceRotationRate; }; -interface DhImportKeyParams extends Algorithm { - generator: Uint8Array; - prime: Uint8Array; -} - -interface DhKeyAlgorithm extends KeyAlgorithm { - generator: Uint8Array; - prime: Uint8Array; -} - -interface DhKeyDeriveParams extends Algorithm { - public: CryptoKey; -} - -interface DhKeyGenParams extends Algorithm { - generator: Uint8Array; - prime: Uint8Array; -} - -interface DocumentEventMap extends GlobalEventHandlersEventMap, DocumentAndElementEventHandlersEventMap { +interface DocumentEventMap extends DocumentAndElementEventHandlersEventMap, GlobalEventHandlersEventMap { "fullscreenchange": Event; "fullscreenerror": Event; "pointerlockchange": Event; @@ -4397,7 +4212,7 @@ interface DocumentEventMap extends GlobalEventHandlersEventMap, DocumentAndEleme } /** Any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree. */ -interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShadowRoot, GlobalEventHandlers, NonElementParentNode, ParentNode, XPathEvaluatorBase { +interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShadowRoot, FontFaceSource, GlobalEventHandlers, NonElementParentNode, ParentNode, XPathEvaluatorBase { /** * Sets or gets the URL for the current document. */ @@ -4421,7 +4236,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * Retrieves a collection of all applet objects in the document. */ /** @deprecated */ - readonly applets: HTMLCollectionOf; + readonly applets: HTMLCollection; /** * Deprecated. Sets or retrieves a value that indicates the background color behind the object. */ @@ -4461,6 +4276,9 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * Returns null if the Document is not currently executing a script or SVG script element (e.g., because the running script is an event handler, or a timeout), or if the currently executing script or SVG script element represents a module script. */ readonly currentScript: HTMLOrSVGScriptElement | null; + /** + * Returns the Window object of the active document. + */ readonly defaultView: (WindowProxy & typeof globalThis) | null; /** * Sets or gets a value that indicates whether the document can be edited. @@ -4551,6 +4369,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad onreadystatechange: ((this: Document, ev: Event) => any) | null; onvisibilitychange: ((this: Document, ev: Event) => any) | null; readonly ownerDocument: null; + readonly pictureInPictureEnabled: boolean; /** * Return an HTMLCollection of the embed elements in the Document. */ @@ -4584,12 +4403,9 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * * If node is a document, throws a "NotSupportedError" DOMException or, if node is a shadow root, throws a "HierarchyRequestError" DOMException. */ - adoptNode(source: T): T; + adoptNode(node: T): T; /** @deprecated */ captureEvents(): void; - caretPositionFromPoint(x: number, y: number): CaretPosition | null; - /** @deprecated */ - caretRangeFromPoint(x: number, y: number): Range; /** @deprecated */ clear(): void; /** @@ -4647,6 +4463,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "AnimationPlaybackEvent"): AnimationPlaybackEvent; createEvent(eventInterface: "AudioProcessingEvent"): AudioProcessingEvent; createEvent(eventInterface: "BeforeUnloadEvent"): BeforeUnloadEvent; + createEvent(eventInterface: "BlobEvent"): BlobEvent; createEvent(eventInterface: "ClipboardEvent"): ClipboardEvent; createEvent(eventInterface: "CloseEvent"): CloseEvent; createEvent(eventInterface: "CompositionEvent"): CompositionEvent; @@ -4655,21 +4472,18 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "DeviceOrientationEvent"): DeviceOrientationEvent; createEvent(eventInterface: "DragEvent"): DragEvent; createEvent(eventInterface: "ErrorEvent"): ErrorEvent; - createEvent(eventInterface: "Event"): Event; - createEvent(eventInterface: "Events"): Event; createEvent(eventInterface: "FocusEvent"): FocusEvent; - createEvent(eventInterface: "FocusNavigationEvent"): FocusNavigationEvent; + createEvent(eventInterface: "FontFaceSetLoadEvent"): FontFaceSetLoadEvent; + createEvent(eventInterface: "FormDataEvent"): FormDataEvent; createEvent(eventInterface: "GamepadEvent"): GamepadEvent; createEvent(eventInterface: "HashChangeEvent"): HashChangeEvent; createEvent(eventInterface: "IDBVersionChangeEvent"): IDBVersionChangeEvent; createEvent(eventInterface: "InputEvent"): InputEvent; createEvent(eventInterface: "KeyboardEvent"): KeyboardEvent; - createEvent(eventInterface: "ListeningStateChangedEvent"): ListeningStateChangedEvent; createEvent(eventInterface: "MediaEncryptedEvent"): MediaEncryptedEvent; createEvent(eventInterface: "MediaKeyMessageEvent"): MediaKeyMessageEvent; createEvent(eventInterface: "MediaQueryListEvent"): MediaQueryListEvent; - createEvent(eventInterface: "MediaStreamErrorEvent"): MediaStreamErrorEvent; - createEvent(eventInterface: "MediaStreamEvent"): MediaStreamEvent; + createEvent(eventInterface: "MediaRecorderErrorEvent"): MediaRecorderErrorEvent; createEvent(eventInterface: "MediaStreamTrackEvent"): MediaStreamTrackEvent; createEvent(eventInterface: "MessageEvent"): MessageEvent; createEvent(eventInterface: "MouseEvent"): MouseEvent; @@ -4677,42 +4491,29 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "MutationEvent"): MutationEvent; createEvent(eventInterface: "MutationEvents"): MutationEvent; createEvent(eventInterface: "OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent; - createEvent(eventInterface: "OverflowEvent"): OverflowEvent; createEvent(eventInterface: "PageTransitionEvent"): PageTransitionEvent; createEvent(eventInterface: "PaymentMethodChangeEvent"): PaymentMethodChangeEvent; createEvent(eventInterface: "PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent; - createEvent(eventInterface: "PermissionRequestedEvent"): PermissionRequestedEvent; createEvent(eventInterface: "PointerEvent"): PointerEvent; createEvent(eventInterface: "PopStateEvent"): PopStateEvent; createEvent(eventInterface: "ProgressEvent"): ProgressEvent; createEvent(eventInterface: "PromiseRejectionEvent"): PromiseRejectionEvent; createEvent(eventInterface: "RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent; createEvent(eventInterface: "RTCDataChannelEvent"): RTCDataChannelEvent; - createEvent(eventInterface: "RTCDtlsTransportStateChangedEvent"): RTCDtlsTransportStateChangedEvent; - createEvent(eventInterface: "RTCErrorEvent"): RTCErrorEvent; - createEvent(eventInterface: "RTCIceCandidatePairChangedEvent"): RTCIceCandidatePairChangedEvent; - createEvent(eventInterface: "RTCIceGathererEvent"): RTCIceGathererEvent; - createEvent(eventInterface: "RTCIceTransportStateChangedEvent"): RTCIceTransportStateChangedEvent; createEvent(eventInterface: "RTCPeerConnectionIceErrorEvent"): RTCPeerConnectionIceErrorEvent; createEvent(eventInterface: "RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent; - createEvent(eventInterface: "RTCSsrcConflictEvent"): RTCSsrcConflictEvent; createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEvent; - createEvent(eventInterface: "SVGZoomEvent"): SVGZoomEvent; - createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent; createEvent(eventInterface: "SpeechRecognitionErrorEvent"): SpeechRecognitionErrorEvent; - createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent; createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent; createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent; createEvent(eventInterface: "StorageEvent"): StorageEvent; - createEvent(eventInterface: "TextEvent"): TextEvent; + createEvent(eventInterface: "SubmitEvent"): SubmitEvent; createEvent(eventInterface: "TouchEvent"): TouchEvent; createEvent(eventInterface: "TrackEvent"): TrackEvent; createEvent(eventInterface: "TransitionEvent"): TransitionEvent; createEvent(eventInterface: "UIEvent"): UIEvent; createEvent(eventInterface: "UIEvents"): UIEvent; - createEvent(eventInterface: "VRDisplayEvent"): VRDisplayEvent; - createEvent(eventInterface: "VRDisplayEvent "): VRDisplayEvent ; createEvent(eventInterface: "WebGLContextEvent"): WebGLContextEvent; createEvent(eventInterface: "WheelEvent"): WheelEvent; createEvent(eventInterface: string): Event; @@ -4721,7 +4522,6 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * @param root The root element or node to start traversing on. * @param whatToShow The type of nodes or elements to appear in the node list * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter. - * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded. */ createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter | null): NodeIterator; /** @@ -4742,11 +4542,8 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * @param root The root element or node to start traversing on. * @param whatToShow The type of nodes or elements to appear in the node list. For more information, see whatToShow. * @param filter A custom NodeFilter function to use. - * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded. */ createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter | null): TreeWalker; - /** @deprecated */ - createTreeWalker(root: Node, whatToShow: number, filter: NodeFilter | null, entityReferenceExpansion?: boolean): TreeWalker; /** * Returns the element for the specified x coordinate and the specified y coordinate. * @param x The x-offset @@ -4760,13 +4557,14 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * @param showUI Display the user interface, defaults to false. * @param value Value to assign. */ + /** @deprecated */ execCommand(commandId: string, showUI?: boolean, value?: string): boolean; /** * Stops document's fullscreen element from being displayed fullscreen and resolves promise when done. */ exitFullscreen(): Promise; + exitPictureInPicture(): Promise; exitPointerLock(): void; - getAnimations(): Animation[]; /** * Returns a reference to the first object with the specified value of the ID attribute. * @param elementId String that specifies the ID value. @@ -4799,7 +4597,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad */ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf; getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf; - getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf; + getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf; /** * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage. */ @@ -4808,12 +4606,13 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * Gets a value indicating whether the object currently has focus. */ hasFocus(): boolean; + hasStorageAccess(): Promise; /** * Returns a copy of node. If deep is true, the copy also includes the node's descendants. * * If node is a document or a shadow root, throws a "NotSupportedError" DOMException. */ - importNode(importedNode: T, deep: boolean): T; + importNode(node: T, deep?: boolean): T; /** * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method. * @param url Specifies a MIME type for the document. @@ -4821,11 +4620,13 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following values are supported. * @param replace Specifies whether the existing entry for the document is replaced in the history list. */ - open(url?: string, name?: string, features?: string, replace?: boolean): Document; + open(unused1?: string, unused2?: string): Document; + open(url: string | URL, name: string, features: string): WindowProxy | null; /** * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document. * @param commandId Specifies a command identifier. */ + /** @deprecated */ queryCommandEnabled(commandId: string): boolean; /** * Returns a Boolean value that indicates whether the specified command is in the indeterminate state. @@ -4836,11 +4637,13 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * Returns a Boolean value that indicates the current state of the command. * @param commandId String that specifies a command identifier. */ + /** @deprecated */ queryCommandState(commandId: string): boolean; /** * Returns a Boolean value that indicates whether the current command is supported on the current range. * @param commandId Specifies a command identifier. */ + /** @deprecated */ queryCommandSupported(commandId: string): boolean; /** * Returns the current value of the document, range, or current selection for the given command. @@ -4849,6 +4652,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad queryCommandValue(commandId: string): string; /** @deprecated */ releaseEvents(): void; + requestStorageAccess(): Promise; /** * Writes one or more HTML expressions to a document in the specified window. * @param content Specifies the text and HTML tags to write. @@ -4886,86 +4690,8 @@ interface DocumentAndElementEventHandlers { removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } -interface DocumentEvent { - createEvent(eventInterface: "AnimationEvent"): AnimationEvent; - createEvent(eventInterface: "AnimationPlaybackEvent"): AnimationPlaybackEvent; - createEvent(eventInterface: "AudioProcessingEvent"): AudioProcessingEvent; - createEvent(eventInterface: "BeforeUnloadEvent"): BeforeUnloadEvent; - createEvent(eventInterface: "ClipboardEvent"): ClipboardEvent; - createEvent(eventInterface: "CloseEvent"): CloseEvent; - createEvent(eventInterface: "CompositionEvent"): CompositionEvent; - createEvent(eventInterface: "CustomEvent"): CustomEvent; - createEvent(eventInterface: "DeviceMotionEvent"): DeviceMotionEvent; - createEvent(eventInterface: "DeviceOrientationEvent"): DeviceOrientationEvent; - createEvent(eventInterface: "DragEvent"): DragEvent; - createEvent(eventInterface: "ErrorEvent"): ErrorEvent; - createEvent(eventInterface: "Event"): Event; - createEvent(eventInterface: "Events"): Event; - createEvent(eventInterface: "FocusEvent"): FocusEvent; - createEvent(eventInterface: "FocusNavigationEvent"): FocusNavigationEvent; - createEvent(eventInterface: "GamepadEvent"): GamepadEvent; - createEvent(eventInterface: "HashChangeEvent"): HashChangeEvent; - createEvent(eventInterface: "IDBVersionChangeEvent"): IDBVersionChangeEvent; - createEvent(eventInterface: "InputEvent"): InputEvent; - createEvent(eventInterface: "KeyboardEvent"): KeyboardEvent; - createEvent(eventInterface: "ListeningStateChangedEvent"): ListeningStateChangedEvent; - createEvent(eventInterface: "MediaEncryptedEvent"): MediaEncryptedEvent; - createEvent(eventInterface: "MediaKeyMessageEvent"): MediaKeyMessageEvent; - createEvent(eventInterface: "MediaQueryListEvent"): MediaQueryListEvent; - createEvent(eventInterface: "MediaStreamErrorEvent"): MediaStreamErrorEvent; - createEvent(eventInterface: "MediaStreamEvent"): MediaStreamEvent; - createEvent(eventInterface: "MediaStreamTrackEvent"): MediaStreamTrackEvent; - createEvent(eventInterface: "MessageEvent"): MessageEvent; - createEvent(eventInterface: "MouseEvent"): MouseEvent; - createEvent(eventInterface: "MouseEvents"): MouseEvent; - createEvent(eventInterface: "MutationEvent"): MutationEvent; - createEvent(eventInterface: "MutationEvents"): MutationEvent; - createEvent(eventInterface: "OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent; - createEvent(eventInterface: "OverflowEvent"): OverflowEvent; - createEvent(eventInterface: "PageTransitionEvent"): PageTransitionEvent; - createEvent(eventInterface: "PaymentMethodChangeEvent"): PaymentMethodChangeEvent; - createEvent(eventInterface: "PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent; - createEvent(eventInterface: "PermissionRequestedEvent"): PermissionRequestedEvent; - createEvent(eventInterface: "PointerEvent"): PointerEvent; - createEvent(eventInterface: "PopStateEvent"): PopStateEvent; - createEvent(eventInterface: "ProgressEvent"): ProgressEvent; - createEvent(eventInterface: "PromiseRejectionEvent"): PromiseRejectionEvent; - createEvent(eventInterface: "RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent; - createEvent(eventInterface: "RTCDataChannelEvent"): RTCDataChannelEvent; - createEvent(eventInterface: "RTCDtlsTransportStateChangedEvent"): RTCDtlsTransportStateChangedEvent; - createEvent(eventInterface: "RTCErrorEvent"): RTCErrorEvent; - createEvent(eventInterface: "RTCIceCandidatePairChangedEvent"): RTCIceCandidatePairChangedEvent; - createEvent(eventInterface: "RTCIceGathererEvent"): RTCIceGathererEvent; - createEvent(eventInterface: "RTCIceTransportStateChangedEvent"): RTCIceTransportStateChangedEvent; - createEvent(eventInterface: "RTCPeerConnectionIceErrorEvent"): RTCPeerConnectionIceErrorEvent; - createEvent(eventInterface: "RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent; - createEvent(eventInterface: "RTCSsrcConflictEvent"): RTCSsrcConflictEvent; - createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEvent; - createEvent(eventInterface: "SVGZoomEvent"): SVGZoomEvent; - createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; - createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent; - createEvent(eventInterface: "SpeechRecognitionErrorEvent"): SpeechRecognitionErrorEvent; - createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent; - createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent; - createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent; - createEvent(eventInterface: "StorageEvent"): StorageEvent; - createEvent(eventInterface: "TextEvent"): TextEvent; - createEvent(eventInterface: "TouchEvent"): TouchEvent; - createEvent(eventInterface: "TrackEvent"): TrackEvent; - createEvent(eventInterface: "TransitionEvent"): TransitionEvent; - createEvent(eventInterface: "UIEvent"): UIEvent; - createEvent(eventInterface: "UIEvents"): UIEvent; - createEvent(eventInterface: "VRDisplayEvent"): VRDisplayEvent; - createEvent(eventInterface: "VRDisplayEvent "): VRDisplayEvent ; - createEvent(eventInterface: "WebGLContextEvent"): WebGLContextEvent; - createEvent(eventInterface: "WheelEvent"): WheelEvent; - createEvent(eventInterface: string): Event; -} - /** A minimal document object that has no parent. It is used as a lightweight version of Document that stores a segment of a document structure comprised of nodes just like a standard document. The key difference is that because the document fragment isn't part of the active document tree structure, changes made to the fragment don't affect the document, cause reflow, or incur any performance impact that can occur when changes are made. */ interface DocumentFragment extends Node, NonElementParentNode, ParentNode { - readonly ownerDocument: Document; - getElementById(elementId: string): HTMLElement | null; } declare var DocumentFragment: { @@ -4974,22 +4700,25 @@ declare var DocumentFragment: { }; interface DocumentOrShadowRoot { + /** + * Returns the deepest element in the document through which or to which key events are being routed. This is, roughly speaking, the focused element in the document. + * + * For the purposes of this API, when a child browsing context is focused, its container is focused in the parent browsing context. For example, if the user moves the focus to a text control in an iframe, the iframe is the element returned by the activeElement API in the iframe's node document. + * + * Similarly, when the focused element is in a different node tree than documentOrShadowRoot, the element returned will be the host that's located in the same node tree as documentOrShadowRoot if documentOrShadowRoot is a shadow-including inclusive ancestor of the focused element, and null if not. + */ readonly activeElement: Element | null; /** * Returns document's fullscreen element. */ readonly fullscreenElement: Element | null; + readonly pictureInPictureElement: Element | null; readonly pointerLockElement: Element | null; /** * Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document. */ readonly styleSheets: StyleSheetList; - caretPositionFromPoint(x: number, y: number): CaretPosition | null; - /** @deprecated */ - caretRangeFromPoint(x: number, y: number): Range; - elementFromPoint(x: number, y: number): Element | null; - elementsFromPoint(x: number, y: number): Element[]; - getSelection(): Selection | null; + getAnimations(): Animation[]; } interface DocumentTimeline extends AnimationTimeline { @@ -5046,6 +4775,19 @@ interface EXT_blend_minmax { readonly MIN_EXT: GLenum; } +interface EXT_color_buffer_float { +} + +interface EXT_color_buffer_half_float { + readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum; + readonly RGB16F_EXT: GLenum; + readonly RGBA16F_EXT: GLenum; + readonly UNSIGNED_NORMALIZED_EXT: GLenum; +} + +interface EXT_float_blend { +} + /** The EXT_frag_depth extension is part of the WebGL API and enables to set a depth value of a fragment from within the fragment shader. */ interface EXT_frag_depth { } @@ -5060,6 +4802,13 @@ interface EXT_sRGB { interface EXT_shader_texture_lod { } +interface EXT_texture_compression_rgtc { + readonly COMPRESSED_RED_GREEN_RGTC2_EXT: GLenum; + readonly COMPRESSED_RED_RGTC1_EXT: GLenum; + readonly COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT: GLenum; + readonly COMPRESSED_SIGNED_RED_RGTC1_EXT: GLenum; +} + /** The EXT_texture_filter_anisotropic extension is part of the WebGL API and exposes two constants for anisotropic filtering (AF). */ interface EXT_texture_filter_anisotropic { readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: GLenum; @@ -5072,7 +4821,7 @@ interface ElementEventMap { } /** Element is the most general base class from which all objects in a Document inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from Element. */ -interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTypeChildNode, ParentNode, Slottable { +interface Element extends Node, ARIAMixin, Animatable, ChildNode, InnerHTML, NonDocumentTypeChildNode, ParentNode, Slottable { readonly attributes: NamedNodeMap; /** * Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. @@ -5102,6 +4851,7 @@ interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTyp onfullscreenerror: ((this: Element, ev: Event) => any) | null; outerHTML: string; readonly ownerDocument: Document; + readonly part: DOMTokenList; /** * Returns the namespace prefix. */ @@ -5131,7 +4881,7 @@ interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTyp */ closest(selector: K): HTMLElementTagNameMap[K] | null; closest(selector: K): SVGElementTagNameMap[K] | null; - closest(selector: string): E | null; + closest(selectors: string): E | null; /** * Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise. */ @@ -5157,7 +4907,7 @@ interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTyp getElementsByTagName(qualifiedName: string): HTMLCollectionOf; getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf; getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf; - getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf; + getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf; /** * Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise. */ @@ -5171,14 +4921,13 @@ interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTyp */ hasAttributes(): boolean; hasPointerCapture(pointerId: number): boolean; - insertAdjacentElement(position: InsertPosition, insertedElement: Element): Element | null; - insertAdjacentHTML(where: InsertPosition, html: string): void; - insertAdjacentText(where: InsertPosition, text: string): void; + insertAdjacentElement(where: InsertPosition, element: Element): Element | null; + insertAdjacentHTML(position: InsertPosition, text: string): void; + insertAdjacentText(where: InsertPosition, data: string): void; /** * Returns true if matching selectors against element's root yields element, and false otherwise. */ matches(selectors: string): boolean; - msGetRegionContent(): any; releasePointerCapture(pointerId: number): void; /** * Removes element's first attribute whose qualified name is qualifiedName. @@ -5220,6 +4969,7 @@ interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTyp * Returns true if qualifiedName is now present, and false otherwise. */ toggleAttribute(qualifiedName: string, force?: boolean): boolean; + /** @deprecated */ webkitMatchesSelector(selectors: string): boolean; addEventListener(type: K, listener: (this: Element, ev: ElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -5288,6 +5038,7 @@ interface Event { * Returns true if event was dispatched by the user agent, and false otherwise. */ readonly isTrusted: boolean; + /** @deprecated */ returnValue: boolean; /** @deprecated */ readonly srcElement: EventTarget | null; @@ -5298,7 +5049,7 @@ interface Event { /** * Returns the event's timestamp as the number of milliseconds measured relative to the time origin. */ - readonly timeStamp: number; + readonly timeStamp: DOMHighResTimeStamp; /** * Returns the type of event, e.g. "click", "hashchange", or "submit". */ @@ -5307,6 +5058,7 @@ interface Event { * Returns the invocation target objects of event's path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root's mode is "closed" that are not reachable from event's currentTarget. */ composedPath(): EventTarget[]; + /** @deprecated */ initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void; /** * If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled. @@ -5335,8 +5087,12 @@ declare var Event: { readonly NONE: number; }; +interface EventListener { + (evt: Event): void; +} + interface EventListenerObject { - handleEvent(evt: Event): void; + handleEvent(object: Event): void; } interface EventSourceEventMap { @@ -5376,7 +5132,7 @@ interface EventSource extends EventTarget { declare var EventSource: { prototype: EventSource; - new(url: string, eventSourceInitDict?: EventSourceInit): EventSource; + new(url: string | URL, eventSourceInitDict?: EventSourceInit): EventSource; readonly CLOSED: number; readonly CONNECTING: number; readonly OPEN: number; @@ -5395,9 +5151,11 @@ interface EventTarget { * * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. * + * If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + * * The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture. */ - addEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): 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. */ @@ -5413,23 +5171,7 @@ declare var EventTarget: { new(): EventTarget; }; -interface ExtensionScriptApis { - extensionIdToShortId(extensionId: string): number; - fireExtensionApiTelemetry(functionName: string, isSucceeded: boolean, isSupported: boolean, errorString: string): void; - genericFunction(routerAddress: any, parameters?: string, callbackId?: number): void; - genericSynchronousFunction(functionId: number, parameters?: string): string; - genericWebRuntimeCallout(to: any, from: any, payload: string): void; - getExtensionId(): string; - registerGenericFunctionCallbackHandler(callbackHandler: Function): void; - registerGenericPersistentCallbackHandler(callbackHandler: Function): void; - registerWebRuntimeCallbackHandler(handler: Function): any; -} - -declare var ExtensionScriptApis: { - prototype: ExtensionScriptApis; - new(): ExtensionScriptApis; -}; - +/** @deprecated */ interface External { /** @deprecated */ AddSearchProvider(): void; @@ -5437,6 +5179,7 @@ interface External { IsSearchProviderInstalled(): void; } +/** @deprecated */ declare var External: { prototype: External; new(): External; @@ -5446,6 +5189,7 @@ declare var External: { interface File extends Blob { readonly lastModified: number; readonly name: string; + readonly webkitRelativePath: string; } declare var File: { @@ -5507,6 +5251,62 @@ declare var FileReader: { readonly LOADING: number; }; +interface FileSystem { + readonly name: string; + readonly root: FileSystemDirectoryEntry; +} + +declare var FileSystem: { + prototype: FileSystem; + new(): FileSystem; +}; + +interface FileSystemDirectoryEntry extends FileSystemEntry { + createReader(): FileSystemDirectoryReader; + getDirectory(path?: string | null, options?: FileSystemFlags, successCallback?: FileSystemEntryCallback, errorCallback?: ErrorCallback): void; + getFile(path?: string | null, options?: FileSystemFlags, successCallback?: FileSystemEntryCallback, errorCallback?: ErrorCallback): void; +} + +declare var FileSystemDirectoryEntry: { + prototype: FileSystemDirectoryEntry; + new(): FileSystemDirectoryEntry; +}; + +/** @deprecated */ +interface FileSystemDirectoryReader { + /** @deprecated */ + readEntries(successCallback: FileSystemEntriesCallback, errorCallback?: ErrorCallback): void; +} + +/** @deprecated */ +declare var FileSystemDirectoryReader: { + prototype: FileSystemDirectoryReader; + new(): FileSystemDirectoryReader; +}; + +interface FileSystemEntry { + readonly filesystem: FileSystem; + readonly fullPath: string; + readonly isDirectory: boolean; + readonly isFile: boolean; + readonly name: string; + getParent(successCallback?: FileSystemEntryCallback, errorCallback?: ErrorCallback): void; +} + +declare var FileSystemEntry: { + prototype: FileSystemEntry; + new(): FileSystemEntry; +}; + +interface FileSystemFileEntry extends FileSystemEntry { + file(successCallback: FileCallback, errorCallback?: ErrorCallback): void; +} + +declare var FileSystemFileEntry: { + prototype: FileSystemFileEntry; + new(): FileSystemFileEntry; +}; + /** Focus-related events like focus, blur, focusin, or focusout. */ interface FocusEvent extends UIEvent { readonly relatedTarget: EventTarget | null; @@ -5517,20 +5317,68 @@ declare var FocusEvent: { new(type: string, eventInitDict?: FocusEventInit): FocusEvent; }; -interface FocusNavigationEvent extends Event { - readonly navigationReason: NavigationReason; - readonly originHeight: number; - readonly originLeft: number; - readonly originTop: number; - readonly originWidth: number; - requestFocus(): void; +interface FontFace { + ascentOverride: string; + descentOverride: string; + display: string; + family: string; + featureSettings: string; + lineGapOverride: string; + readonly loaded: Promise; + readonly status: FontFaceLoadStatus; + stretch: string; + style: string; + unicodeRange: string; + variant: string; + variationSettings: string; + weight: string; + load(): Promise; +} + +declare var FontFace: { + prototype: FontFace; + new(family: string, source: string | BinaryData, descriptors?: FontFaceDescriptors): FontFace; +}; + +interface FontFaceSetEventMap { + "loading": Event; + "loadingdone": Event; + "loadingerror": Event; +} + +interface FontFaceSet extends EventTarget { + onloading: ((this: FontFaceSet, ev: Event) => any) | null; + onloadingdone: ((this: FontFaceSet, ev: Event) => any) | null; + onloadingerror: ((this: FontFaceSet, ev: Event) => any) | null; + readonly ready: Promise; + readonly status: FontFaceSetLoadStatus; + check(font: string, text?: string): boolean; + load(font: string, text?: string): Promise; + forEach(callbackfn: (value: FontFace, key: FontFace, parent: FontFaceSet) => void, thisArg?: any): void; + addEventListener(type: K, listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var FontFaceSet: { + prototype: FontFaceSet; + new(initialFaces: FontFace[]): FontFaceSet; +}; + +interface FontFaceSetLoadEvent extends Event { + readonly fontfaces: ReadonlyArray; } -declare var FocusNavigationEvent: { - prototype: FocusNavigationEvent; - new(type: string, eventInitDict?: FocusNavigationEventInit): FocusNavigationEvent; +declare var FontFaceSetLoadEvent: { + prototype: FontFaceSetLoadEvent; + new(type: string, eventInitDict?: FontFaceSetLoadEventInit): FontFaceSetLoadEvent; }; +interface FontFaceSource { + readonly fonts: FontFaceSet; +} + /** Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data". */ interface FormData { append(name: string, value: string | Blob, fileName?: string): void; @@ -5547,6 +5395,18 @@ declare var FormData: { new(form?: HTMLFormElement): FormData; }; +interface FormDataEvent extends Event { + /** + * Returns a FormData object representing names and values of elements associated to the target form. Operations on the FormData object will affect form data to be submitted. + */ + readonly formData: FormData; +} + +declare var FormDataEvent: { + prototype: FormDataEvent; + new(type: string, eventInitDict: FormDataEventInit): FormDataEvent; +}; + /** A change in volume. It is an AudioNode audio-processing module that causes a given gain to be applied to the input data before its propagation to the output. A GainNode always has exactly one input and one output, both with the same number of channels. */ interface GainNode extends AudioNode { readonly gain: AudioParam; @@ -5562,13 +5422,11 @@ interface Gamepad { readonly axes: ReadonlyArray; readonly buttons: ReadonlyArray; readonly connected: boolean; - readonly hand: GamepadHand; readonly hapticActuators: ReadonlyArray; readonly id: string; readonly index: number; readonly mapping: GamepadMappingType; - readonly pose: GamepadPose | null; - readonly timestamp: number; + readonly timestamp: DOMHighResTimeStamp; } declare var Gamepad: { @@ -5601,7 +5459,6 @@ declare var GamepadEvent: { /** This Gamepad API interface represents hardware in the controller designed to provide haptic feedback to the user (if available), most commonly vibration hardware. */ interface GamepadHapticActuator { readonly type: GamepadHapticActuatorType; - pulse(value: number, duration: number): Promise; } declare var GamepadHapticActuator: { @@ -5609,23 +5466,6 @@ declare var GamepadHapticActuator: { new(): GamepadHapticActuator; }; -/** This Gamepad API interface represents the pose of a WebVR controller at a given timestamp (which includes orientation, position, velocity, and acceleration information.) */ -interface GamepadPose { - readonly angularAcceleration: Float32Array | null; - readonly angularVelocity: Float32Array | null; - readonly hasOrientation: boolean; - readonly hasPosition: boolean; - readonly linearAcceleration: Float32Array | null; - readonly linearVelocity: Float32Array | null; - readonly orientation: Float32Array | null; - readonly position: Float32Array | null; -} - -declare var GamepadPose: { - prototype: GamepadPose; - new(): GamepadPose; -}; - interface GenericTransformStream { readonly readable: ReadableStream; readonly writable: WritableStream; @@ -5634,8 +5474,8 @@ interface GenericTransformStream { /** An object able to programmatically obtain the position of the device. It gives Web content access to the location of the device. This allows a Web site or app to offer customized results based on the user's location. */ interface Geolocation { clearWatch(watchId: number): void; - getCurrentPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): void; - watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): number; + getCurrentPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback | null, options?: PositionOptions): void; + watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback | null, options?: PositionOptions): number; } declare var Geolocation: { @@ -5660,7 +5500,7 @@ declare var GeolocationCoordinates: { interface GeolocationPosition { readonly coords: GeolocationCoordinates; - readonly timestamp: number; + readonly timestamp: DOMTimeStamp; } declare var GeolocationPosition: { @@ -5693,7 +5533,6 @@ interface GlobalEventHandlersEventMap { "auxclick": MouseEvent; "beforeinput": InputEvent; "blur": FocusEvent; - "cancel": Event; "canplay": Event; "canplaythrough": Event; "change": Event; @@ -5708,7 +5547,6 @@ interface GlobalEventHandlersEventMap { "drag": DragEvent; "dragend": DragEvent; "dragenter": DragEvent; - "dragexit": Event; "dragleave": DragEvent; "dragover": DragEvent; "dragstart": DragEvent; @@ -5720,6 +5558,7 @@ interface GlobalEventHandlersEventMap { "focus": FocusEvent; "focusin": FocusEvent; "focusout": FocusEvent; + "formdata": FormDataEvent; "gotpointercapture": PointerEvent; "input": Event; "invalid": Event; @@ -5775,6 +5614,10 @@ interface GlobalEventHandlersEventMap { "transitionstart": TransitionEvent; "volumechange": Event; "waiting": Event; + "webkitanimationend": Event; + "webkitanimationiteration": Event; + "webkitanimationstart": Event; + "webkittransitionend": Event; "wheel": WheelEvent; } @@ -5794,7 +5637,6 @@ interface GlobalEventHandlers { * @param ev The focus event. */ onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null; - oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** * Occurs when playback is possible, but would require further buffering. * @param ev The event. @@ -5838,7 +5680,6 @@ interface GlobalEventHandlers { * @param ev The drag event. */ ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null; - ondragexit: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation. * @param ev The drag event. @@ -5880,6 +5721,7 @@ interface GlobalEventHandlers { * @param ev The event. */ onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null; + onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null; ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null; oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null; @@ -5892,6 +5734,7 @@ interface GlobalEventHandlers { * Fires when the user presses an alphanumeric key. * @param ev The event. */ + /** @deprecated */ onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null; /** * Fires when the user releases a key. @@ -5990,7 +5833,6 @@ interface GlobalEventHandlers { * @param ev The event. */ onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null; - onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null; /** * Occurs when the seek operation ends. * @param ev The event. @@ -6043,6 +5885,10 @@ interface GlobalEventHandlers { * @param ev The event. */ onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null; + onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null; + onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null; + onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null; + onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null; onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null; addEventListener(type: K, listener: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -6134,56 +5980,6 @@ declare var HTMLAnchorElement: { new(): HTMLAnchorElement; }; -interface HTMLAppletElement extends HTMLElement { - /** @deprecated */ - align: string; - /** - * Sets or retrieves a text alternative to the graphic. - */ - /** @deprecated */ - alt: string; - /** - * Sets or retrieves a character string that can be used to implement your own archive functionality for the object. - */ - /** @deprecated */ - archive: string; - /** @deprecated */ - code: string; - /** - * Sets or retrieves the URL of the component. - */ - /** @deprecated */ - codeBase: string; - readonly form: HTMLFormElement | null; - /** - * Sets or retrieves the height of the object. - */ - /** @deprecated */ - height: string; - /** @deprecated */ - hspace: number; - /** - * Sets or retrieves the shape of the object. - */ - /** @deprecated */ - name: string; - /** @deprecated */ - object: string; - /** @deprecated */ - vspace: number; - /** @deprecated */ - width: string; - addEventListener(type: K, listener: (this: HTMLAppletElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLAppletElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; -} - -declare var HTMLAppletElement: { - prototype: HTMLAppletElement; - new(): HTMLAppletElement; -}; - /** Provides special properties and methods (beyond those of the regular object HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of elements. */ interface HTMLAreaElement extends HTMLElement, HTMLHyperlinkElementUtils { /** @@ -6389,6 +6185,7 @@ interface HTMLCanvasElement extends HTMLElement { * Gets or sets the width of a canvas element on a document. */ width: number; + captureStream(frameRequestRate?: number): MediaStream; /** * Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas. * @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext("2d"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext("experimental-webgl"); @@ -6404,7 +6201,6 @@ interface HTMLCanvasElement extends HTMLElement { * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image. */ toDataURL(type?: string, quality?: any): string; - transferControlToOffscreen(): OffscreenCanvas; addEventListener(type: K, listener: (this: HTMLCanvasElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLCanvasElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -6478,6 +6274,9 @@ declare var HTMLDataElement: { /** Provides special properties (beyond the HTMLElement object interface it also has available to it by inheritance) to manipulate elements and their content. */ interface HTMLDataListElement extends HTMLElement { + /** + * Returns an HTMLCollection of the option elements of the datalist element. + */ readonly options: HTMLCollectionOf; addEventListener(type: K, listener: (this: HTMLDataListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -6503,23 +6302,15 @@ declare var HTMLDetailsElement: { new(): HTMLDetailsElement; }; +/** @deprecated - this is not available in most browsers */ interface HTMLDialogElement extends HTMLElement { - open: boolean; - returnValue: string; - close(returnValue?: string): void; - show(): void; - showModal(): void; addEventListener(type: K, listener: (this: HTMLDialogElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLDialogElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } -declare var HTMLDialogElement: { - prototype: HTMLDialogElement; - new(): HTMLDialogElement; -}; - +/** @deprecated */ interface HTMLDirectoryElement extends HTMLElement { /** @deprecated */ compact: boolean; @@ -6529,6 +6320,7 @@ interface HTMLDirectoryElement extends HTMLElement { removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } +/** @deprecated */ declare var HTMLDirectoryElement: { prototype: HTMLDirectoryElement; new(): HTMLDirectoryElement; @@ -6552,7 +6344,7 @@ declare var HTMLDivElement: { new(): HTMLDivElement; }; -/** The HTMLDocument property of Window objects is an alias that browsers expose for the Document interface object. */ +/** @deprecated - use Document */ interface HTMLDocument extends Document { addEventListener(type: K, listener: (this: HTMLDocument, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -6560,12 +6352,7 @@ interface HTMLDocument extends Document { removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } -declare var HTMLDocument: { - prototype: HTMLDocument; - new(): HTMLDocument; -}; - -interface HTMLElementEventMap extends ElementEventMap, GlobalEventHandlersEventMap, DocumentAndElementEventHandlersEventMap { +interface HTMLElementEventMap extends ElementEventMap, DocumentAndElementEventHandlersEventMap, GlobalEventHandlersEventMap { } /** Any HTML element. Some elements directly implement this interface, while others implement it via an interface that inherits it. */ @@ -6583,6 +6370,7 @@ interface HTMLElement extends Element, DocumentAndElementEventHandlers, ElementC readonly offsetParent: Element | null; readonly offsetTop: number; readonly offsetWidth: number; + outerText: string; spellcheck: boolean; title: string; translate: boolean; @@ -6635,12 +6423,18 @@ declare var HTMLEmbedElement: { /** Provides special properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of
elements. */ interface HTMLFieldSetElement extends HTMLElement { disabled: boolean; + /** + * Returns an HTMLCollection of the form controls in the element. + */ readonly elements: HTMLCollection; /** * Retrieves a reference to the form that the object is embedded in. */ readonly form: HTMLFormElement | null; name: string; + /** + * Returns the string "fieldset". + */ readonly type: string; /** * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. @@ -6676,6 +6470,7 @@ declare var HTMLFieldSetElement: { }; /** Implements the document object model (DOM) representation of the font element. The HTML Font Element defines the font size, font face and color of text. */ +/** @deprecated */ interface HTMLFontElement extends HTMLElement { /** @deprecated */ color: string; @@ -6692,6 +6487,7 @@ interface HTMLFontElement extends HTMLElement { removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } +/** @deprecated */ declare var HTMLFontElement: { prototype: HTMLFontElement; new(): HTMLFontElement; @@ -6763,6 +6559,7 @@ interface HTMLFormElement extends HTMLElement { */ checkValidity(): boolean; reportValidity(): boolean; + requestSubmit(submitter?: HTMLElement | null): void; /** * Fires when the user resets a form. */ @@ -6784,6 +6581,7 @@ declare var HTMLFormElement: { new(): HTMLFormElement; }; +/** @deprecated */ interface HTMLFrameElement extends HTMLElement { /** * Retrieves the document object of the page or frame. @@ -6841,6 +6639,7 @@ interface HTMLFrameElement extends HTMLElement { removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } +/** @deprecated */ declare var HTMLFrameElement: { prototype: HTMLFrameElement; new(): HTMLFrameElement; @@ -6850,6 +6649,7 @@ interface HTMLFrameSetElementEventMap extends HTMLElementEventMap, WindowEventHa } /** Provides special properties (beyond those of the regular HTMLElement interface they also inherit) for manipulating elements. */ +/** @deprecated */ interface HTMLFrameSetElement extends HTMLElement, WindowEventHandlers { /** * Sets or retrieves the frame widths of the object. @@ -6867,6 +6667,7 @@ interface HTMLFrameSetElement extends HTMLElement, WindowEventHandlers { removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } +/** @deprecated */ declare var HTMLFrameSetElement: { prototype: HTMLFrameSetElement; new(): HTMLFrameSetElement; @@ -6954,17 +6755,70 @@ declare var HTMLHtmlElement: { }; interface HTMLHyperlinkElementUtils { + /** + * Returns the hyperlink's URL's fragment (includes leading "#" if non-empty). + * + * Can be set, to change the URL's fragment (ignores leading "#"). + */ hash: string; + /** + * Returns the hyperlink's URL's host and port (if different from the default port for the scheme). + * + * Can be set, to change the URL's host and port. + */ host: string; + /** + * Returns the hyperlink's URL's host. + * + * Can be set, to change the URL's host. + */ hostname: string; + /** + * Returns the hyperlink's URL. + * + * Can be set, to change the URL. + */ href: string; toString(): string; + /** + * Returns the hyperlink's URL's origin. + */ readonly origin: string; + /** + * Returns the hyperlink's URL's password. + * + * Can be set, to change the URL's password. + */ password: string; + /** + * Returns the hyperlink's URL's path. + * + * Can be set, to change the URL's path. + */ pathname: string; + /** + * Returns the hyperlink's URL's port. + * + * Can be set, to change the URL's port. + */ port: string; + /** + * Returns the hyperlink's URL's scheme. + * + * Can be set, to change the URL's scheme. + */ protocol: string; + /** + * Returns the hyperlink's URL's query (includes leading "?" if non-empty). + * + * Can be set, to change the URL's query (ignores leading "?"). + */ search: string; + /** + * Returns the hyperlink's URL's username. + * + * Can be set, to change the URL's username. + */ username: string; } @@ -6977,7 +6831,6 @@ interface HTMLIFrameElement extends HTMLElement { align: string; allow: string; allowFullscreen: boolean; - allowPaymentRequest: boolean; /** * Retrieves the document object of the page or frame. */ @@ -7155,6 +7008,7 @@ interface HTMLInputElement extends HTMLElement { * Specifies whether autocomplete is applied to an editable text field. */ autocomplete: string; + capture: string; /** * Sets or retrieves the state of the check box or radio button. */ @@ -7201,6 +7055,9 @@ interface HTMLInputElement extends HTMLElement { * Sets or retrieves the height of the object. */ height: number; + /** + * When set, overrides the rendering of checkbox controls so that the current value is not visible. + */ indeterminate: boolean; readonly labels: NodeListOf | null; /** @@ -7288,6 +7145,8 @@ interface HTMLInputElement extends HTMLElement { * Returns the input field value as a number. */ valueAsNumber: number; + readonly webkitEntries: ReadonlyArray; + webkitdirectory: boolean; /** * Sets or retrieves the width of the object. */ @@ -7361,6 +7220,9 @@ declare var HTMLLIElement: { /** Gives access to properties specific to