UNPKG

web-push-notifications

Version:
13 lines (12 loc) 622 B
/** * Loads the subscription forms widget (an ES module that registers the * <pushwoosh-subscribe-widget> custom element) exactly once per page. * Resolves when the custom element is defined. * * The wait is bounded by a timeout: a script that loads but throws during * evaluation never registers the element and never fires the script `error` * event, so `customElements.whenDefined()` alone would hang forever (and with * it the whole web popups pipeline). On failure the memoized promise is reset * so the next popup can retry. */ export declare function ensureSubscriptionFormsWidgetLoaded(): Promise<void>;