Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
interface PermissionStatus : EventTarget {
readonly attribute PermissionState status;
attribute EventHandler onchange;
interface Permissions {
readonly attribute GeolocationPermission geolocation;
readonly attribute MidiPermission midi;
readonly attribute NotificationsPermission notifications;
readonly attribute PushPermission push;
// Geolocation
interface GeolocationPermission {
Promise<PermissionStatus> query();
// Midi
dictionary MidiPermissionOptions {
boolean sysex = false;
interface MidiPermission {
Promise<PermissionStatus> query(optional MidiPermissionOptions options);
// Notifications
interface NotificationsPermission {
Promise<PermissionStatus> query();
// Push
dictionary PushPermissionOptions {
boolean userVisible = false;
interface PushPermission {
Promise<PermissionStatus> query(optional PushPermissionOptions options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment