Interface nsIPushNotifierType

Fires XPCOM observer notifications and service worker events for messages sent to push subscriptions.

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • scope: string
    • principal: nsIPrincipal
    • message: string
    • flags: uint32_t

    Returns void

  • Fires a push-message observer notification, and sends a push event to the service worker registered for the |scope|. |messageId| is an opaque ID used to report errors if the worker fails to handle the message.

    Parameters

    • scope: string
    • principal: nsIPrincipal
    • messageId: string

    Returns void

  • Same as notifyPush, except the subject of the observer notification receives an nsIPushMessage instance containing the |data|. Service workers can access the |data| via the PushMessageData WebIDL interface.

    Parameters

    • scope: string
    • principal: nsIPrincipal
    • messageId: string
    • data: invalid

    Returns void

  • Fires a push-subscription-change observer notification, and sends a pushsubscriptionchange event to the service worker registered for the |scope|.

    Parameters

    • scope: string
    • principal: nsIPrincipal

    Returns void

  • Fires a push-subscription-modified observer notification. Chrome code can listen for this notification to see when a subscription is added, updated, removed, or expired for any |scope|.

    This is useful for Dev Tools and debugging add-ons that passively observe when subscriptions are created or dropped. Other callers should listen for push-subscription-change and resubscribe instead.

    Parameters

    • scope: string
    • principal: nsIPrincipal

    Returns void

Generated using TypeDoc