<?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>290336</bug_id>
          
          <creation_ts>2025-03-24 13:32:52 -0700</creation_ts>
          <short_desc>Extension storage.onChanged API missing second callback parameter in Safari for iOS</short_desc>
          <delta_ts>2025-05-21 14:34:02 -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 Extensions</component>
          <version>Safari 18</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 18</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>281644</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>marcustyphoon</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>carlosj-webkit-bugzilla</cc>
    
    <cc>timothy</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2105668</commentid>
    <comment_count>0</comment_count>
    <who name="">marcustyphoon</who>
    <bug_when>2025-03-24 13:32:52 -0700</bug_when>
    <thetext>As noted in https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/onChanged, a web extension storage listener callback registered with e.g. browser.storage.onChanged.addListener((changes, areaName) =&gt; console.log({ changes, areaName })) should have an areaName parameter with the string &apos;local&apos; when triggered by e.g. browser.storage.local.set; it does in Chromium and Firefox.

I am observing, however, that the parameter is undefined.

Tested in iOS 18.1.1 in a content script in a Manifest v3 extension loaded via xcrun safari-web-extension-converter. (The extension in question is https://github.com/AprilSylph/XKit-Rewritten, though I don&apos;t have a Safari framework committed to git/specific test code.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2105669</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-03-24 13:33:02 -0700</bug_when>
    <thetext>&lt;rdar://problem/147776365&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2105677</commentid>
    <comment_count>2</comment_count>
    <who name="">marcustyphoon</who>
    <bug_when>2025-03-24 14:13:02 -0700</bug_when>
    <thetext>Example code: https://github.com/marcustyphoon/storage-extension-test/tree/main/src

This logs {changes: Object, areaName: &quot;local&quot;} in MacOS Safari 17.6 but {changes: Object, areaName: undefined} in Safari on iOS 18.1.1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2109426</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos J.">carlosj-webkit-bugzilla</who>
    <bug_when>2025-04-07 09:17:23 -0700</bug_when>
    <thetext>Tested in iOS 18.3.1, and the areaName has been returned. Seems it has been fixed with https://github.com/WebKit/WebKit/pull/35493

Related bug: https://bugs.webkit.org/show_bug.cgi?id=281644</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2118788</commentid>
    <comment_count>4</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2025-05-21 14:33:49 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 281644 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2118790</commentid>
    <comment_count>5</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2025-05-21 14:34:02 -0700</bug_when>
    <thetext>@Carlos J. Thank you for confirming.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>