/
index.md
44 lines (29 loc) · 1.01 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
title: "PushManager: hasPermission() method"
short-title: hasPermission()
slug: Web/API/PushManager/hasPermission
page-type: web-api-instance-method
status:
- deprecated
- non-standard
browser-compat: api.PushManager.hasPermission
---
{{ApiRef("Push API")}}{{deprecated_header}}{{non-standard_header}}{{AvailableInWorkers}}
The **`PushManager.hasPermission()`** method of the {{domxref("PushManager")}} interface returns a {{jsxref("Promise")}} that resolves to the `PushPermissionStatus` of the requesting webapp, which will be one of `granted`, `denied`, or `default`.
> **Note:** This feature has been superseded by the {{domxref("PushManager.permissionState()")}} method.
## Syntax
```js-nolint
hasPermission()
```
### Parameters
None.
### Return value
A {{jsxref("Promise")}} that resolves to the `PushPermissionStatus`.
## Examples
```js
// TBD
```
## Specifications
This feature is not part of any specification anymore. It is no longer on track to become a standard.
## Browser compatibility
{{Compat}}