Post

Replies

Boosts

Views

Activity

Safari Web Extension tab ids are 0 during webNavigation callbacks until onCompleted event
Safari Version 14.0.1 (16610.2.11.51.8) I am porting a Chrome/Firefox/Edge extension to Safari Web Extension. Mostly, the process was painless, I am, however, seeing quite different behavior in the tab ids generated by Safari compared to Chrome, Firefox, and Edge. My extension has callbacks for each of these browser.webNavigation events: browser.webNavigation.onBeforeNavigate browser.webNavigation.onCommitted browser.webNavigation.onDOMContentLoaded In each of these I rely on the tab id for various future tab targeting operations. When opening a new tab, the details object passed to each of these callbacks has a non-zero tabId on Chrome, Firefox, and Edge. However, in Safari, the tabId is always zero. To debug, I added one more callback: browser.webNavigation.onCompleted At this point Safari finally has a non-zero tabId in the details param. Needless to say this is causing some consternation with achieving the same outcomes as tab tracking on Chrome, Firefox, and Edge. It's like Safari is treating new tabs as "non tabs" until navigation completes. You can even see it when trying to get the tab by tabId=0: browser.tabs.get(tabId) // tabId=0 here 	.then(tab => { 		// tab is undefined 	}); Seems like this might be a bug. I can't imagine why the behavior is so different from other browsers. Any ideas on how to work around?
5
1
2.8k
Apr ’25
Widget not available on developer iPhone
I feel like this should be a pretty common problem with a pretty simple answer, but has anyone encountered a problem where your app's widget is not available on a device where you've been testing a dev version of your app as well as installing the App Store version? So what I mean is, on my iPhone, I'm often testing daily builds of our app, and I'm also installing our app from the App Store. At some point, this combo results in our app's widget being unavailable in the list of widgets on my iPhone. I've tried uninstalling dev builds, App Store releases, and so on, but the widget never comes back on a new install. Looking for a magic combo here, I guess, to clear some mystery widget registry or something.
1
0
1.3k
Sep ’21
Safari Web Extension tab ids are 0 during webNavigation callbacks until onCompleted event
Safari Version 14.0.1 (16610.2.11.51.8) I am porting a Chrome/Firefox/Edge extension to Safari Web Extension. Mostly, the process was painless, I am, however, seeing quite different behavior in the tab ids generated by Safari compared to Chrome, Firefox, and Edge. My extension has callbacks for each of these browser.webNavigation events: browser.webNavigation.onBeforeNavigate browser.webNavigation.onCommitted browser.webNavigation.onDOMContentLoaded In each of these I rely on the tab id for various future tab targeting operations. When opening a new tab, the details object passed to each of these callbacks has a non-zero tabId on Chrome, Firefox, and Edge. However, in Safari, the tabId is always zero. To debug, I added one more callback: browser.webNavigation.onCompleted At this point Safari finally has a non-zero tabId in the details param. Needless to say this is causing some consternation with achieving the same outcomes as tab tracking on Chrome, Firefox, and Edge. It's like Safari is treating new tabs as "non tabs" until navigation completes. You can even see it when trying to get the tab by tabId=0: browser.tabs.get(tabId) // tabId=0 here 	.then(tab => { 		// tab is undefined 	}); Seems like this might be a bug. I can't imagine why the behavior is so different from other browsers. Any ideas on how to work around?
Replies
5
Boosts
1
Views
2.8k
Activity
Apr ’25
Widget not available on developer iPhone
I feel like this should be a pretty common problem with a pretty simple answer, but has anyone encountered a problem where your app's widget is not available on a device where you've been testing a dev version of your app as well as installing the App Store version? So what I mean is, on my iPhone, I'm often testing daily builds of our app, and I'm also installing our app from the App Store. At some point, this combo results in our app's widget being unavailable in the list of widgets on my iPhone. I've tried uninstalling dev builds, App Store releases, and so on, but the widget never comes back on a new install. Looking for a magic combo here, I guess, to clear some mystery widget registry or something.
Replies
1
Boosts
0
Views
1.3k
Activity
Sep ’21