-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should tabs.Tab.lastAccessed be optional? #713
Comments
Why would anyone want that? The new behavior doesn't match the name and judging by the comments in the "recent CL" the change in behavior wasn't based on an investigation how extensions are using this property. |
I believe Firefox has been setting this on tab creation for a long time. While it is marked as optional, it's possible developers are relying on that behavior. |
It sounds wrong and that's not what I see in Firefox source code:
Where "application" means Firefox. Now this behavior actually does make sense, unlike Chromium's. |
While the The @tophf, the logic you linked is for the |
It's about the intent expressed in the name of the property and how the property is used, which becomes important in this particular case when the tab is opened in background, which is an action indicative of the user's intent to "access this tab later", i.e. the tab definitely wasn't yet accessed, so Chromium's new behavior isn't helpful. Same for Firefox. Arguably the correct solution would be to account for this particular case explicitly by returning |
I see, I've linked the wrong part of the code (lastSeenActive), which means Firefox always behaved incorrectly in this case (opening of an inactive tab) just like Chromium behaves now, while Chromium behaved correctly for a while. I've edited my previous comment accordingly. |
This is a confusing and ill-defined property. Before discussing whether it should be optional, we should discuss what it should be, rather than how it is currently implemented. There are some related concepts here, such as creation time, last interaction time, last visible time, tab switching, window switching, and page navigation. For a multi-tabs window
For a single-tab window or popup window
|
In Chrome Canary 132.0.6800.1 and Firefox Nightly 133.0a1 (2024-10-27), tabs.Tab.lastAccessed is always set:
Firefox (and previously Chrome) marks this field as optional. Following a recent CL, this is no longer marked as optional in Chrome. It is not currently supported in Safari.
It would be great to decide between marking this as optional and having it be optional in practice, or documenting this as non-optional if all browsers want to continue setting it during tab creation.
Chromium bug: https://issues.chromium.org/375711376
The text was updated successfully, but these errors were encountered: