Skip to main content
class Deno.PermissionStatus
extends EventTarget

An EventTarget returned from the Deno.permissions API which can provide updates to any state changes of the permission.

Properties

onchange: ((this: PermissionStatus, ev: Event) => any) | null
readonly
state: PermissionState

Methods

addEventListener<K extends keyof PermissionStatusEventMap>(
type: K,
listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
removeEventListener<K extends keyof PermissionStatusEventMap>(
type: K,
listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void