您正位於 MDN Web Docs 的可編輯版本

以 MDN Web Docs 使用者身分檢視: https://developer.mozilla.org/zh-TW/docs/Web/API/PushRegistrationManager

PushRegistrationManager

我們的志工尚未將本文翻譯為 正體中文 (繁體) 版本。加入我們,幫忙翻譯!
您也可以閱讀本文的 English (US) 版本。

Deprecated
This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

Returns an interface to register or unregister a push registration, get an active registration, or check the permission status of the registration. This interface has been superceded by PushManager.

Methods

PushRegistrationManager.register()
Returns a promise that resolves to a PushRegistration with details of a new registration.
PushRegistrationManager.unregister()
Returns a promise that resolves to a PushRegistration with details of the unregistered registration.
PushRegistrationManager.getRegistration()
Returns a promise that resolves the PushRegistration associated with the current webapp.
PushRegistrationManager.hasPermission()
Returns a promise that resolves to the PushPermissionStatus of the requesting webapp.

Browser Compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
PushRegistrationManager
ExperimentalDeprecated
Chrome No support NoEdge No support NoFirefox ? IE No support NoOpera No support NoSafari ? WebView Android No support NoChrome Android No support NoFirefox Android ? Opera Android No support NoSafari iOS ? Samsung Internet Android No support No
getRegistration
ExperimentalDeprecated
Chrome No support NoEdge No support NoFirefox ? IE No support NoOpera No support NoSafari ? WebView Android No support NoChrome Android No support NoFirefox Android ? Opera Android No support NoSafari iOS ? Samsung Internet Android No support No
hasPermission
ExperimentalDeprecated
Chrome No support NoEdge No support NoFirefox ? IE No support NoOpera No support NoSafari ? WebView Android No support NoChrome Android No support NoFirefox Android ? Opera Android No support NoSafari iOS ? Samsung Internet Android No support No
register
ExperimentalDeprecated
Chrome No support NoEdge No support NoFirefox ? IE No support NoOpera No support NoSafari ? WebView Android No support NoChrome Android No support NoFirefox Android ? Opera Android No support NoSafari iOS ? Samsung Internet Android No support No
unregister
ExperimentalDeprecated
Chrome No support NoEdge No support NoFirefox ? IE No support NoOpera No support NoSafari ? WebView Android No support NoChrome Android No support NoFirefox Android ? Opera Android No support NoSafari iOS ? Samsung Internet Android No support No

Legend

No support  
No support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.