PushSubscriptionOptions.userVisibleOnly
PushSubscriptionOptions
の userVisibleOnly
読み取り専用プロパティは、プッシュサブスクリプションがユーザーに見える効果を持つメッセージのみに使われるかどうかを表します。
値
プッシュサブスクリプションがユーザーに見える効果を持つメッセージのみに使われるかどうかを表す boolean
値です。
例
この例では、userVisibleOnly
の値をコンソールに出力します。
js
navigator.serviceWorker.ready.then((reg) => {
reg.pushManager.getSubscription().then((subscription) => {
const options = subscription.options;
console.log(options.userVisibleOnly); // ユーザーに見えるサブスクリプションであれば true
});
});
仕様書
Specification |
---|
Push API # dom-pushsubscriptionoptions-uservisibleonly |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
userVisibleOnly |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.