The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
Optionaloptions: boolean | AddEventListenerOptionsChecks the permissions of a given subject.
The subject of the permissions.
A Promise that resolves to true if the subject has all the permissions required.
The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
Reads the missing permissions for a subject. If subject is omitted, reads the missing permissions across all subjects.
Optionalsubject: Subject
The subject of the permissions.
The set of missing permissions required by the subject via require, or if no subject is given, missing permissions across all subjects.
Reads the required permissions for a subject. If subject is omitted, reads the required permissions across all subjects.
Optionalsubject: Subject
The subject of the permissions.
The set of permissions declared for the subject via require, or if no subject is given, permissions across all subjects.
The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
Optionaloptions: boolean | EventListenerOptionsCreates a decorator that checks for an extension permission. For a class or method that requires multiple permissions, use multiple decorators.
Permissions are checked at declaration time, not at instantiation or call time. Permission checks are asynchronous, best-effort, and do not block any code from running.
Permission warnings in the console may be suppressed by calling PermissionErrorEvent.preventDefault.
The extension permission to require. May be either a named permission or a match pattern for a host permission.
Checks extension permissions and triggers warnings for missing ones. For an example, PermissionChecker.require.