Skip to content

Instantly share code, notes, and snippets.

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