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
8 changes: 7 additions & 1 deletion baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28320,6 +28320,12 @@ declare var PushManager: {
readonly supportedContentEncodings: ReadonlyArray<string>;
};

/** Available only in secure contexts. */
interface PushManagerAttribute {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
readonly pushManager: PushManager;
}

/**
* The **`PushSubscription`** interface of the Push API provides a subscription's URL endpoint along with the public key and secrets that should be used for encrypting push messages to this subscription. This information must be passed to the application server, using any desired application-specific method.
* Available only in secure contexts.
Expand Down Expand Up @@ -34738,7 +34744,7 @@ interface ServiceWorkerRegistrationEventMap {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
*/
interface ServiceWorkerRegistration extends EventTarget {
interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
/**
* The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is activating or activated. This property is initially set to null.
*
Expand Down
8 changes: 7 additions & 1 deletion baselines/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7070,6 +7070,12 @@ declare var PushManager: {
readonly supportedContentEncodings: ReadonlyArray<string>;
};

/** Available only in secure contexts. */
interface PushManagerAttribute {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
readonly pushManager: PushManager;
}

/**
* The **`PushSubscription`** interface of the Push API provides a subscription's URL endpoint along with the public key and secrets that should be used for encrypting push messages to this subscription. This information must be passed to the application server, using any desired application-specific method.
* Available only in secure contexts.
Expand Down Expand Up @@ -7803,7 +7809,7 @@ interface ServiceWorkerRegistrationEventMap {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
*/
interface ServiceWorkerRegistration extends EventTarget {
interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
/**
* The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is activating or activated. This property is initially set to null.
*
Expand Down
8 changes: 7 additions & 1 deletion baselines/ts5.5/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28296,6 +28296,12 @@ declare var PushManager: {
readonly supportedContentEncodings: ReadonlyArray<string>;
};

/** Available only in secure contexts. */
interface PushManagerAttribute {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
readonly pushManager: PushManager;
}

/**
* The **`PushSubscription`** interface of the Push API provides a subscription's URL endpoint along with the public key and secrets that should be used for encrypting push messages to this subscription. This information must be passed to the application server, using any desired application-specific method.
* Available only in secure contexts.
Expand Down Expand Up @@ -34713,7 +34719,7 @@ interface ServiceWorkerRegistrationEventMap {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
*/
interface ServiceWorkerRegistration extends EventTarget {
interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
/**
* The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is activating or activated. This property is initially set to null.
*
Expand Down
8 changes: 7 additions & 1 deletion baselines/ts5.5/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7067,6 +7067,12 @@ declare var PushManager: {
readonly supportedContentEncodings: ReadonlyArray<string>;
};

/** Available only in secure contexts. */
interface PushManagerAttribute {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
readonly pushManager: PushManager;
}

/**
* The **`PushSubscription`** interface of the Push API provides a subscription's URL endpoint along with the public key and secrets that should be used for encrypting push messages to this subscription. This information must be passed to the application server, using any desired application-specific method.
* Available only in secure contexts.
Expand Down Expand Up @@ -7800,7 +7806,7 @@ interface ServiceWorkerRegistrationEventMap {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
*/
interface ServiceWorkerRegistration extends EventTarget {
interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
/**
* The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is activating or activated. This property is initially set to null.
*
Expand Down
8 changes: 7 additions & 1 deletion baselines/ts5.6/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28317,6 +28317,12 @@ declare var PushManager: {
readonly supportedContentEncodings: ReadonlyArray<string>;
};

/** Available only in secure contexts. */
interface PushManagerAttribute {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
readonly pushManager: PushManager;
}

/**
* The **`PushSubscription`** interface of the Push API provides a subscription's URL endpoint along with the public key and secrets that should be used for encrypting push messages to this subscription. This information must be passed to the application server, using any desired application-specific method.
* Available only in secure contexts.
Expand Down Expand Up @@ -34735,7 +34741,7 @@ interface ServiceWorkerRegistrationEventMap {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
*/
interface ServiceWorkerRegistration extends EventTarget {
interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
/**
* The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is activating or activated. This property is initially set to null.
*
Expand Down
8 changes: 7 additions & 1 deletion baselines/ts5.6/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7067,6 +7067,12 @@ declare var PushManager: {
readonly supportedContentEncodings: ReadonlyArray<string>;
};

/** Available only in secure contexts. */
interface PushManagerAttribute {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
readonly pushManager: PushManager;
}

/**
* The **`PushSubscription`** interface of the Push API provides a subscription's URL endpoint along with the public key and secrets that should be used for encrypting push messages to this subscription. This information must be passed to the application server, using any desired application-specific method.
* Available only in secure contexts.
Expand Down Expand Up @@ -7800,7 +7806,7 @@ interface ServiceWorkerRegistrationEventMap {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
*/
interface ServiceWorkerRegistration extends EventTarget {
interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
/**
* The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is activating or activated. This property is initially set to null.
*
Expand Down
8 changes: 7 additions & 1 deletion baselines/ts5.9/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28317,6 +28317,12 @@ declare var PushManager: {
readonly supportedContentEncodings: ReadonlyArray<string>;
};

/** Available only in secure contexts. */
interface PushManagerAttribute {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
readonly pushManager: PushManager;
}

/**
* The **`PushSubscription`** interface of the Push API provides a subscription's URL endpoint along with the public key and secrets that should be used for encrypting push messages to this subscription. This information must be passed to the application server, using any desired application-specific method.
* Available only in secure contexts.
Expand Down Expand Up @@ -34735,7 +34741,7 @@ interface ServiceWorkerRegistrationEventMap {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
*/
interface ServiceWorkerRegistration extends EventTarget {
interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
/**
* The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is activating or activated. This property is initially set to null.
*
Expand Down
8 changes: 7 additions & 1 deletion baselines/ts5.9/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7067,6 +7067,12 @@ declare var PushManager: {
readonly supportedContentEncodings: ReadonlyArray<string>;
};

/** Available only in secure contexts. */
interface PushManagerAttribute {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
readonly pushManager: PushManager;
}

/**
* The **`PushSubscription`** interface of the Push API provides a subscription's URL endpoint along with the public key and secrets that should be used for encrypting push messages to this subscription. This information must be passed to the application server, using any desired application-specific method.
* Available only in secure contexts.
Expand Down Expand Up @@ -7800,7 +7806,7 @@ interface ServiceWorkerRegistrationEventMap {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
*/
interface ServiceWorkerRegistration extends EventTarget {
interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
/**
* The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is activating or activated. This property is initially set to null.
*
Expand Down
9 changes: 4 additions & 5 deletions inputfiles/patches/push-api.kdl
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
interface-mixin PushManagerAttribute {
// Windows support only on WebKit as of 2025-10
property pushManager exposed=ServiceWorker
}

removals {
interface Window {
// Not supported on Windows as of 2025-10
includes PushManagerAttribute
}
dictionary PushEventInit {
member notification // WebKit only as of 2025-12
}
Expand Down
10 changes: 8 additions & 2 deletions src/build/patches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ function handleMixinAndInterfaces(
let method: Record<string, DeepPartial<OverridableMethod>> = {};
let constructor: DeepPartial<OverridableMethod> | undefined;
let typeParameters = {};
const includes: string[] = [];

for (const child of node.children) {
switch (child.name) {
Expand Down Expand Up @@ -236,6 +237,10 @@ function handleMixinAndInterfaces(
typeParameters = handleTypeParameters(child);
break;
}
case "includes": {
includes.push(string(child.values[0]));
break;
}
default:
throw new Error(`Unknown node name: ${child.name}`);
}
Expand All @@ -255,8 +260,9 @@ function handleMixinAndInterfaces(
return {
name,
...optionalNestedMember("events", event, { event }),
properties: { property },
methods: { method },
...optionalNestedMember("properties", property, { property }),
...optionalNestedMember("methods", method, { method }),
...optionalNestedMember("implements", includes, includes),
...optionalMember("extends", "string", node.properties?.extends),
...optionalMember("overrideThis", "string", node.properties?.overrideThis),
...optionalMember("forward", "string", node.properties?.forward),
Expand Down