Last active
August 29, 2015 14:18
-
-
Save mounirlamouri/8a823ce60a31d926d4da to your computer and use it in GitHub Desktop.
Permissions API changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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