This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The PermissionStatus.onchange event of the PermissionStatus interface is called whenever the PermissionStatus.state property changes.


PermissionStatus.onchange = function() { ... }
PermissionStatus.addEventListener('change', function() { ... })


navigator.permissions.query({name:'geolocation'}).then(function(permissionStatus) {
  console.log('geolocation permission state is ', permissionStatus.state);
  permissionStatus.onchange = function() {
    console.log('geolocation permission state has changed to ', this.state);


Specification Status Comment
The definition of 'onchange' in that specification.
Working Draft Initial definition.

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic support
Chrome Full support 43Edge ? Firefox Full support 46IE ? Opera ? Safari ? WebView Android Full support 43Chrome Android Full support 43Edge Mobile ? Firefox Android Full support 46Opera Android ? Safari iOS ? Samsung Internet Android ?


Full support  
Full support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.

Document Tags and Contributors

Contributors to this page: connorshea, chrisdavidmills, jasonpang, poiru, jpmedley, keithjgrant
Last updated by: connorshea,