Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions baselines/audioworklet.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ declare var TransformStreamDefaultController: {
new(): TransformStreamDefaultController;
};

/** Available only in secure contexts. */
interface WorkletGlobalScope {
}

Expand Down
157 changes: 133 additions & 24 deletions baselines/dom.generated.d.ts

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions baselines/dom.iterable.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ interface NamedNodeMap {
}

interface Navigator {
/** Available only in secure contexts. */
requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: Iterable<MediaKeySystemConfiguration>): Promise<MediaKeySystemAccess>;
vibrate(pattern: Iterable<number>): boolean;
}
Expand Down
61 changes: 50 additions & 11 deletions baselines/serviceworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,10 @@ declare var ByteLengthQueuingStrategy: {
new(init: QueuingStrategyInit): ByteLengthQueuingStrategy;
};

/** 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. */
/**
* 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.
* Available only in secure contexts.
*/
interface Cache {
add(request: RequestInfo): Promise<void>;
addAll(requests: RequestInfo[]): Promise<void>;
Expand All @@ -757,7 +760,10 @@ declare var Cache: {
new(): Cache;
};

/** The storage for Cache objects. */
/**
* The storage for Cache objects.
* Available only in secure contexts.
*/
interface CacheStorage {
delete(cacheName: string): Promise<boolean>;
has(cacheName: string): Promise<boolean>;
Expand Down Expand Up @@ -865,6 +871,7 @@ declare var CountQueuingStrategy: {

/** Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives. */
interface Crypto {
/** Available only in secure contexts. */
readonly subtle: SubtleCrypto;
getRandomValues<T extends ArrayBufferView | null>(array: T): T;
}
Expand All @@ -874,7 +881,10 @@ declare var Crypto: {
new(): Crypto;
};

/** The CryptoKey dictionary of the Web Crypto API represents a cryptographic key. */
/**
* The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
* Available only in secure contexts.
*/
interface CryptoKey {
readonly algorithm: KeyAlgorithm;
readonly extractable: boolean;
Expand Down Expand Up @@ -2085,6 +2095,7 @@ interface NavigatorOnLine {
readonly onLine: boolean;
}

/** Available only in secure contexts. */
interface NavigatorStorage {
readonly storage: StorageManager;
}
Expand Down Expand Up @@ -2379,7 +2390,10 @@ declare var PromiseRejectionEvent: {
new(type: string, eventInitDict: PromiseRejectionEventInit): PromiseRejectionEvent;
};

/** This Push API interface represents a push message that has been received. This event is sent to the global scope of a ServiceWorker. It contains the information sent from an application server to a PushSubscription. */
/**
* This Push API interface represents a push message that has been received. This event is sent to the global scope of a ServiceWorker. It contains the information sent from an application server to a PushSubscription.
* Available only in secure contexts.
*/
interface PushEvent extends ExtendableEvent {
readonly data: PushMessageData | null;
}
Expand All @@ -2389,7 +2403,10 @@ declare var PushEvent: {
new(type: string, eventInitDict?: PushEventInit): PushEvent;
};

/** This Push API interface provides a way to receive notifications from third-party servers as well as request URLs for push notifications. */
/**
* This Push API interface provides a way to receive notifications from third-party servers as well as request URLs for push notifications.
* Available only in secure contexts.
*/
interface PushManager {
getSubscription(): Promise<PushSubscription | null>;
permissionState(options?: PushSubscriptionOptionsInit): Promise<PushPermissionState>;
Expand All @@ -2402,7 +2419,10 @@ declare var PushManager: {
readonly supportedContentEncodings: ReadonlyArray<string>;
};

/** This Push API interface provides methods which let you retrieve the push data sent by a server in various formats. */
/**
* This Push API interface provides methods which let you retrieve the push data sent by a server in various formats.
* Available only in secure contexts.
*/
interface PushMessageData {
arrayBuffer(): ArrayBuffer;
blob(): Blob;
Expand All @@ -2415,7 +2435,10 @@ declare var PushMessageData: {
new(): PushMessageData;
};

/** This Push API interface provides a subcription's URL endpoint and allows unsubscription from a push service. */
/**
* This Push API interface provides a subcription's URL endpoint and allows unsubscription from a push service.
* Available only in secure contexts.
*/
interface PushSubscription {
readonly endpoint: string;
readonly options: PushSubscriptionOptions;
Expand All @@ -2429,6 +2452,7 @@ declare var PushSubscription: {
new(): PushSubscription;
};

/** Available only in secure contexts. */
interface PushSubscriptionOptions {
readonly applicationServerKey: ArrayBuffer | null;
}
Expand Down Expand Up @@ -2560,7 +2584,10 @@ interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
"statechange": Event;
}

/** This ServiceWorker API interface provides a reference to a service worker. Multiple browsing contexts (e.g. pages, workers, etc.) can be associated with the same service worker, each through a unique ServiceWorker object. */
/**
* This ServiceWorker API interface provides a reference to a service worker. Multiple browsing contexts (e.g. pages, workers, etc.) can be associated with the same service worker, each through a unique ServiceWorker object.
* Available only in secure contexts.
*/
interface ServiceWorker extends EventTarget, AbstractWorker {
onstatechange: ((this: ServiceWorker, ev: Event) => any) | null;
readonly scriptURL: string;
Expand All @@ -2584,7 +2611,10 @@ interface ServiceWorkerContainerEventMap {
"messageerror": MessageEvent;
}

/** The ServiceWorkerContainer interface of the ServiceWorker API provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister and update service workers, and access the state of service workers and their registrations. */
/**
* The ServiceWorkerContainer interface of the ServiceWorker API provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister and update service workers, and access the state of service workers and their registrations.
* Available only in secure contexts.
*/
interface ServiceWorkerContainer extends EventTarget {
readonly controller: ServiceWorker | null;
oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null;
Expand Down Expand Up @@ -2645,7 +2675,10 @@ interface ServiceWorkerRegistrationEventMap {
"updatefound": Event;
}

/** This ServiceWorker API interface represents the service worker registration. You register a service worker to control one or more pages that share the same origin. */
/**
* This ServiceWorker API interface represents the service worker registration. You register a service worker to control one or more pages that share the same origin.
* Available only in secure contexts.
*/
interface ServiceWorkerRegistration extends EventTarget {
readonly active: ServiceWorker | null;
readonly installing: ServiceWorker | null;
Expand All @@ -2669,6 +2702,7 @@ declare var ServiceWorkerRegistration: {
new(): ServiceWorkerRegistration;
};

/** Available only in secure contexts. */
interface StorageManager {
estimate(): Promise<StorageEstimate>;
persisted(): Promise<boolean>;
Expand All @@ -2679,7 +2713,10 @@ declare var StorageManager: {
new(): StorageManager;
};

/** This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto). */
/**
* This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto).
* Available only in secure contexts.
*/
interface SubtleCrypto {
decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<any>;
deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
Expand Down Expand Up @@ -4954,6 +4991,7 @@ declare var WindowClient: {
};

interface WindowOrWorkerGlobalScope {
/** Available only in secure contexts. */
readonly caches: CacheStorage;
readonly crossOriginIsolated: boolean;
readonly crypto: Crypto;
Expand Down Expand Up @@ -5317,6 +5355,7 @@ declare function importScripts(...urls: (string | URL)[]): void;
/** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
declare function dispatchEvent(event: Event): boolean;
declare var fonts: FontFaceSet;
/** Available only in secure contexts. */
declare var caches: CacheStorage;
declare var crossOriginIsolated: boolean;
declare var crypto: Crypto;
Expand Down
51 changes: 42 additions & 9 deletions baselines/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,10 @@ declare var ByteLengthQueuingStrategy: {
new(init: QueuingStrategyInit): ByteLengthQueuingStrategy;
};

/** 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. */
/**
* 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.
* Available only in secure contexts.
*/
interface Cache {
add(request: RequestInfo): Promise<void>;
addAll(requests: RequestInfo[]): Promise<void>;
Expand All @@ -729,7 +732,10 @@ declare var Cache: {
new(): Cache;
};

/** The storage for Cache objects. */
/**
* The storage for Cache objects.
* Available only in secure contexts.
*/
interface CacheStorage {
delete(cacheName: string): Promise<boolean>;
has(cacheName: string): Promise<boolean>;
Expand Down Expand Up @@ -809,6 +815,7 @@ declare var CountQueuingStrategy: {

/** Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives. */
interface Crypto {
/** Available only in secure contexts. */
readonly subtle: SubtleCrypto;
getRandomValues<T extends ArrayBufferView | null>(array: T): T;
}
Expand All @@ -818,7 +825,10 @@ declare var Crypto: {
new(): Crypto;
};

/** The CryptoKey dictionary of the Web Crypto API represents a cryptographic key. */
/**
* The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
* Available only in secure contexts.
*/
interface CryptoKey {
readonly algorithm: KeyAlgorithm;
readonly extractable: boolean;
Expand Down Expand Up @@ -2005,6 +2015,7 @@ interface NavigatorOnLine {
readonly onLine: boolean;
}

/** Available only in secure contexts. */
interface NavigatorStorage {
readonly storage: StorageManager;
}
Expand Down Expand Up @@ -2288,7 +2299,10 @@ declare var PromiseRejectionEvent: {
new(type: string, eventInitDict: PromiseRejectionEventInit): PromiseRejectionEvent;
};

/** This Push API interface provides a way to receive notifications from third-party servers as well as request URLs for push notifications. */
/**
* This Push API interface provides a way to receive notifications from third-party servers as well as request URLs for push notifications.
* Available only in secure contexts.
*/
interface PushManager {
getSubscription(): Promise<PushSubscription | null>;
permissionState(options?: PushSubscriptionOptionsInit): Promise<PushPermissionState>;
Expand All @@ -2301,7 +2315,10 @@ declare var PushManager: {
readonly supportedContentEncodings: ReadonlyArray<string>;
};

/** This Push API interface provides a subcription's URL endpoint and allows unsubscription from a push service. */
/**
* This Push API interface provides a subcription's URL endpoint and allows unsubscription from a push service.
* Available only in secure contexts.
*/
interface PushSubscription {
readonly endpoint: string;
readonly options: PushSubscriptionOptions;
Expand All @@ -2315,6 +2332,7 @@ declare var PushSubscription: {
new(): PushSubscription;
};

/** Available only in secure contexts. */
interface PushSubscriptionOptions {
readonly applicationServerKey: ArrayBuffer | null;
}
Expand Down Expand Up @@ -2446,7 +2464,10 @@ interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
"statechange": Event;
}

/** This ServiceWorker API interface provides a reference to a service worker. Multiple browsing contexts (e.g. pages, workers, etc.) can be associated with the same service worker, each through a unique ServiceWorker object. */
/**
* This ServiceWorker API interface provides a reference to a service worker. Multiple browsing contexts (e.g. pages, workers, etc.) can be associated with the same service worker, each through a unique ServiceWorker object.
* Available only in secure contexts.
*/
interface ServiceWorker extends EventTarget, AbstractWorker {
onstatechange: ((this: ServiceWorker, ev: Event) => any) | null;
readonly scriptURL: string;
Expand All @@ -2470,7 +2491,10 @@ interface ServiceWorkerContainerEventMap {
"messageerror": MessageEvent;
}

/** The ServiceWorkerContainer interface of the ServiceWorker API provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister and update service workers, and access the state of service workers and their registrations. */
/**
* The ServiceWorkerContainer interface of the ServiceWorker API provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister and update service workers, and access the state of service workers and their registrations.
* Available only in secure contexts.
*/
interface ServiceWorkerContainer extends EventTarget {
readonly controller: ServiceWorker | null;
oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null;
Expand All @@ -2496,7 +2520,10 @@ interface ServiceWorkerRegistrationEventMap {
"updatefound": Event;
}

/** This ServiceWorker API interface represents the service worker registration. You register a service worker to control one or more pages that share the same origin. */
/**
* This ServiceWorker API interface represents the service worker registration. You register a service worker to control one or more pages that share the same origin.
* Available only in secure contexts.
*/
interface ServiceWorkerRegistration extends EventTarget {
readonly active: ServiceWorker | null;
readonly installing: ServiceWorker | null;
Expand Down Expand Up @@ -2541,6 +2568,7 @@ declare var SharedWorkerGlobalScope: {
new(): SharedWorkerGlobalScope;
};

/** Available only in secure contexts. */
interface StorageManager {
estimate(): Promise<StorageEstimate>;
persisted(): Promise<boolean>;
Expand All @@ -2551,7 +2579,10 @@ declare var StorageManager: {
new(): StorageManager;
};

/** This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto). */
/**
* This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto).
* Available only in secure contexts.
*/
interface SubtleCrypto {
decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<any>;
deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
Expand Down Expand Up @@ -4815,6 +4846,7 @@ declare var WebSocket: {
};

interface WindowOrWorkerGlobalScope {
/** Available only in secure contexts. */
readonly caches: CacheStorage;
readonly crossOriginIsolated: boolean;
readonly crypto: Crypto;
Expand Down Expand Up @@ -5340,6 +5372,7 @@ declare function importScripts(...urls: (string | URL)[]): void;
/** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
declare function dispatchEvent(event: Event): boolean;
declare var fonts: FontFaceSet;
/** Available only in secure contexts. */
declare var caches: CacheStorage;
declare var crossOriginIsolated: boolean;
declare var crypto: Crypto;
Expand Down
Loading