The tabs.onUpdated extension API is not fully supported.

According to https://developer.apple.com/documentation/safariservices/safari_web_extensions/assessing_your_safari_web_extension_s_browser_compatibility, tabs.onUpdated should be fully supported. However, I have noticed that the changeInfo only contains 'status'. This is insufficient because it does not give enough information what has actually changed on a tab.

For example, 'url' is expected to be in the changeInfo if tab's URL has changed. See https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/onUpdated#changeInfo.

Note: already submitted a feedback to Safari via apple standard feedback channel. Don't know what will happen with that as I have never heard anything back from Apple. Coming from Microsoft platform, I find Apple awkwardly unreachable. And they don't provide enough information on their documentation. Do you guys share the same feelings? or it's just me.

Answered by here_nerd in 708369022

This problem seems to be resolved in Safari Version 15.4 (17613.1.17.1.6).

Have you granted your extension access to the websites that you are navigating to?

If you haven't granted your extension access to these websites, then the tabs.onUpdated event wouldn't include the URLs. See the "Grant and Manage Permissions" section of https://developer.apple.com/documentation/safariservices/safari_web_extensions/managing_safari_web_extension_permissions?language=objc.

Hope this helps!
Thank you bweinstein for your reply.

I already have "<allurls>" in the permissions key in the manifest.json. I hope <allurls> should cover everything, right?

For clarification, I am talking about

Code Block
browser.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {...})

The problem is that 'changeInfo' in safari has only one property - 'status'. The other properties are not there, e.g. changeInfo.url. The document states clearly that changeInfo should have url when the update is about url change --> "the tab's URL if it has changed".
Accepted Answer

This problem seems to be resolved in Safari Version 15.4 (17613.1.17.1.6).

The tabs.onUpdated extension API is not fully supported.
 
 
Q