Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/dts/lib.deno.ns.d.ts>Deno.PermissionStatus

A modern runtime for JavaScript and TypeScript.
Go to Latest
class Deno.PermissionStatus
extends EventTarget
import { Deno } from "https://deno.land/x/deno@v1.28.0/cli/dts/lib.deno.ns.d.ts";
const { PermissionStatus } = Deno;

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