chromium/third_party/blink/renderer/modules/push_messaging/push_manager.idl

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://w3c.github.io/push-api/#pushmanager-interface

[
    Exposed=(Window,Worker),
    RuntimeEnabled=PushMessaging
] interface PushManager {
    [SameObject, SaveSameObject, HighEntropy=Direct, Measure]
    static readonly attribute FrozenArray<DOMString> supportedContentEncodings;

    [CallWith=ScriptState, RaisesException] Promise<PushSubscription> subscribe(optional PushSubscriptionOptionsInit options = {});
    [CallWith=ScriptState] Promise<PushSubscription?> getSubscription();
    [CallWith=ScriptState, RaisesException] Promise<PermissionState> permissionState(optional PushSubscriptionOptionsInit options = {});
};