This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

Notification.permission

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

참고 : 이 기능은 Web Worker에서 사용할 수 있습니다.

보안 컨텍스트: 이 기능은 일부 또는 모든 지원 브라우저보안 컨텍스트 (HTTPS)에서만 사용할 수 있습니다.

permission 속성은 웹 알림에 있어서 사용자에 의해 현재 앱에 허가된 현재 권한을 가리킵니다.

구문

js
var permission = Notification.permission;

다음은 현재 권한을 표현하는 문자열입니다.

  • granted: 사용자가 의도하여 어플리케이션이 알림을 보낼 수 있도록 허가.
  • denied: 사용자가 의도하여 어플리케이션이 알림을 보내는 것을 거부.
  • default: 사용자의 결정은 알 수 없으나, 어플리케이션 기본적으로 denied 와 같이 동작할 것 입니다.

명세

Specification
Notifications API
# dom-notification-permission

브라우저 호환성

같이 보기