Closed Bug 1383254 Opened 4 years ago Closed 4 years ago

tabs.onUpdated sometimes fires unexpectedly, without user action

Categories

(WebExtensions :: Untriaged, enhancement)

55 Branch
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: pmorris, Unassigned)

Details

I've noticed that tabs.onUpdated[0] can sometimes fire "in the background" without user action. I've seen it fire with a url like "resource://activity-streams/..."  

I assumed this would only fire in response to a user navigating to a new url, but that doesn't seem to be the case?  Is this expected behavior?  Not sure what counts as an update and what can trigger one.  

I'm working on porting "Mind the Time"[1] to WebExtensions and have uploaded some beta releases.  The most recent has console logging to see when tabs.onUpdated fires and with what url.

This is on FF 55.0 dev edition, multi-process, on Ubuntu 16.04, with my own profile with many open tabs, other add-ons, and several windows open.

[0] https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/tabs/onUpdated
[1] https://addons.mozilla.org/en-US/firefox/addon/mind-the-time/
tabs.onUpdated has no correlation to user action. It fires whenever a property of a tab changes, which can happen for any number of reasons, including a script changing a title, a HTTP refresh timeout causing a reload, a tab process crash, ...
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.