iOS 16, iOS 17, MacOS Sonoma, Safari 17.5, permissionStatus.onchange not working

navigator.permissions.query -> permissionStatus.onchange is Supposed to listen to the event of a change in permissions in the browser settings. This works for all browsers, but in Safari for iOS and MacOS this seems to be broken in the currently recent versions 17.x

Example:

navigator.permissions.query({ name: 'notifications' }).then((permissionStatus) => {
    permissions = permissionStatus.state; // this value gets set correctly
    permissionStatus.onchange = () => {
     
    // This will not get executed when permissions have been changed
    //   within the safari settings app, or iOS Settings for PWA or Safari      
    };
  });

Can someone from Apple's Webkit Team please comment on this? Thank you. T.

I have the same issue when asking camera permission.

Also facing this issue

Did you figure this out? I'm having the same issue.

Same with Safari 17.1 (19616.2.9.11.7) and iOS simulator (PWA installed)

One more reason why I never use safari. Its devtool's debugger is clunky and lack of some modern WebAPIs and buggy APIs make my life as a developer very hard. I genuinely hate the Developer Experience. Chome and Firefox are so easy to work with. I hope some day Apple focuses on their devtools and software products

iOS 16, iOS 17, MacOS Sonoma, Safari 17.5, permissionStatus.onchange not working
 
 
Q