[Exposed=(Window,Worker), SecureContext]
interface Trigger {
readonly attribute USVString type;
};
[Constructor(DOMTimeStamp timestamp), Exposed=(Window,Worker), SecureContext]
interface TimestampTrigger : Trigger {
readonly attribute DOMTimeStamp timestamp;
};
partial dictionary NotificationOptions {
Trigger showTrigger = null;
};
partial dictionary GetNotificationOptions {
boolean includeTriggered = false;
};
partial interface Notification {
[SameObject] readonly attribute Trigger showTrigger;
}
The create a notification algorithm will be amended to throw a TypeError
exception when a showTrigger
has been provided, but not a serviceWorkerRegistration
. This removes the ability to use notification triggers for non-persistent notifications, which inherently are tied to the lifetime of the document.