mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision 4333a1d2f109795547fc5e22ebfc8481fa649de7
This commit is contained in:
parent
728ebcc932
commit
8c46b67f8e
456 changed files with 10561 additions and 5108 deletions
96
tests/wpt/web-platform-tests/interfaces/push-api.idl
Normal file
96
tests/wpt/web-platform-tests/interfaces/push-api.idl
Normal file
|
@ -0,0 +1,96 @@
|
|||
// GENERATED CONTENT - DO NOT EDIT
|
||||
// Content of this file was automatically extracted from the
|
||||
// "Push API" spec.
|
||||
// See: https://w3c.github.io/push-api/
|
||||
|
||||
[SecureContext]
|
||||
partial interface ServiceWorkerRegistration {
|
||||
readonly attribute PushManager pushManager;
|
||||
};
|
||||
[Exposed=(Window,Worker),
|
||||
SecureContext]
|
||||
interface PushManager {
|
||||
[SameObject]
|
||||
static readonly attribute FrozenArray<DOMString> supportedContentEncodings;
|
||||
|
||||
Promise<PushSubscription> subscribe(optional PushSubscriptionOptionsInit options);
|
||||
Promise<PushSubscription?> getSubscription();
|
||||
Promise<PushPermissionState> permissionState(optional PushSubscriptionOptionsInit options);
|
||||
};
|
||||
dictionary PushSubscriptionOptionsInit {
|
||||
boolean userVisibleOnly = false;
|
||||
(BufferSource or DOMString)? applicationServerKey = null;
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker),
|
||||
SecureContext]
|
||||
interface PushSubscriptionOptions {
|
||||
readonly attribute boolean userVisibleOnly;
|
||||
[SameObject]
|
||||
readonly attribute ArrayBuffer? applicationServerKey;
|
||||
};
|
||||
[Exposed=(Window,Worker),
|
||||
SecureContext]
|
||||
interface PushSubscription {
|
||||
readonly attribute USVString endpoint;
|
||||
readonly attribute DOMTimeStamp? expirationTime;
|
||||
[SameObject]
|
||||
readonly attribute PushSubscriptionOptions options;
|
||||
ArrayBuffer? getKey(PushEncryptionKeyName name);
|
||||
Promise<boolean> unsubscribe();
|
||||
|
||||
PushSubscriptionJSON toJSON();
|
||||
};
|
||||
|
||||
dictionary PushSubscriptionJSON {
|
||||
USVString endpoint;
|
||||
DOMTimeStamp? expirationTime;
|
||||
record<DOMString, USVString> keys;
|
||||
};
|
||||
enum PushEncryptionKeyName {
|
||||
"p256dh",
|
||||
"auth"
|
||||
};
|
||||
[Exposed=ServiceWorker,
|
||||
SecureContext]
|
||||
interface PushMessageData {
|
||||
ArrayBuffer arrayBuffer();
|
||||
Blob blob();
|
||||
any json();
|
||||
USVString text();
|
||||
};
|
||||
[Exposed=ServiceWorker,
|
||||
SecureContext]
|
||||
partial interface ServiceWorkerGlobalScope {
|
||||
attribute EventHandler onpush;
|
||||
attribute EventHandler onpushsubscriptionchange;
|
||||
};
|
||||
typedef (BufferSource or USVString) PushMessageDataInit;
|
||||
|
||||
dictionary PushEventInit : ExtendableEventInit {
|
||||
PushMessageDataInit data;
|
||||
};
|
||||
|
||||
[Constructor(DOMString type, optional PushEventInit eventInitDict),
|
||||
Exposed=ServiceWorker,
|
||||
SecureContext]
|
||||
interface PushEvent : ExtendableEvent {
|
||||
readonly attribute PushMessageData? data;
|
||||
};
|
||||
dictionary PushSubscriptionChangeInit : ExtendableEventInit {
|
||||
PushSubscription newSubscription = null;
|
||||
PushSubscription oldSubscription = null;
|
||||
};
|
||||
|
||||
[Constructor(DOMString type, optional PushSubscriptionChangeInit eventInitDict),
|
||||
Exposed=ServiceWorker,
|
||||
SecureContext]
|
||||
interface PushSubscriptionChangeEvent : ExtendableEvent {
|
||||
readonly attribute PushSubscription? newSubscription;
|
||||
readonly attribute PushSubscription? oldSubscription;
|
||||
};
|
||||
enum PushPermissionState {
|
||||
"denied",
|
||||
"granted",
|
||||
"prompt",
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue