<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>256201</bug_id>
          
          <creation_ts>2023-05-02 00:34:14 -0700</creation_ts>
          <short_desc>The onchange event in navigator.permissions.query doesn&apos;t work properly in Safari 16.4.</short_desc>
          <delta_ts>2023-06-12 07:03:00 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>Safari 16</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>iOS 16</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>jyunhanlin</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>joshualuckers</cc>
    
    <cc>jyunhanlin</cc>
    
    <cc>karlcow</cc>
    
    <cc>sihui_liu</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1952325</commentid>
    <comment_count>0</comment_count>
    <who name="">jyunhanlin</who>
    <bug_when>2023-05-02 00:34:14 -0700</bug_when>
    <thetext># Steps to Reproduce:

1. Open a web page in Safari 16.4.
2. Try to register the onchange event with the following code:
```
navigator.permissions.query({ name: &apos;notifications&apos; }).then(permissionStatus =&gt; {
  permissionStatus.onchange = () =&gt; {
    console.log(&apos;Notification permission status has changed:&apos;, permissionStatus.state);
  };
});
```
3. Choose to either allow or block the notification permission in the popped-up permission request dialog.
4. Observe if the console outputs a message indicating the change of notification permission status.

# Expected Results:

The console should output a message indicating the change of notification permission status when the permission status is changed.

# Actual Results:

The console doesn&apos;t output any message indicating the change of notification permission status when the permission status is changed.

# Version Information:

Safari browser version: 16.4
Operating system: macOS Big Sur 11.6.3

# Additional Information:

The onchange event works fine in other modern browsers such as Chrome, Firefox, and Edge.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1952554</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-05-02 18:43:59 -0700</bug_when>
    <thetext>&lt;rdar://problem/108820760&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>