Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Implement tabs.discard method

NEW
Assigned to

Status

()

Toolkit
WebExtensions: Frontend
P3
normal
8 months ago
22 hours ago

People

(Reporter: kernp25, Assigned: bsilverberg)

Tracking

(Depends on: 1 bug)

unspecified
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [tabs] triaged)

(Reporter)

Description

8 months ago
https://developer.chrome.com/extensions/tabs#method-discard

Updated

8 months ago
Depends on: 1284886

Updated

8 months ago
Status: UNCONFIRMED → NEW
Component: WebExtensions: Untriaged → WebExtensions: Frontend
Ever confirmed: true
Whiteboard: [tabs]

Updated

8 months ago
Summary: add chrome.tabs.discard method → Implement tabs.discard method

Updated

7 months ago
Priority: -- → P3
Whiteboard: [tabs] → [tabs] triaged

Updated

7 months ago
Duplicate of this bug: 1325484

Updated

6 months ago
webextensions: --- → +

Updated

6 months ago
Duplicate of this bug: 1270784

Updated

6 months ago
Duplicate of this bug: 1333047

Updated

6 months ago
See Also: → bug 1333046

Comment 4

6 months ago
Do we also want a dedicated method to restore tabs again (use case e.g. https://addons.mozilla.org/en-US/android/addon/tabpreloader/), or just allow e.g. the reload method to handle that case (which might or might not still require some code changes to correctly restore unloaded tabs)?

Comment 5

6 months ago
No, there's a corresponding tab `discarded` property that they should be able to set via `tabs.update` if we want to support that functionality. I'm frankly annoyed that even this method exists, rather than just the ability to set that property via `tabs.update` in the first place. I'm considering just implementing it as a compatibility stub that calls `tabs.update`.

Comment 6

6 months ago
I've got no real experience of that API, so thanks very much for the answer, sounds okay.

Updated

4 months ago
Assignee: nobody → bob.silverberg

Updated

2 months ago
See Also: → bug 1364610
Blocks: 1366759
No longer blocks: 1366759

Updated

2 months ago
Duplicate of this bug: 1367192

Comment 8

2 months ago
Just FYI, since I'm guessing that people will be less familiar with Android:
At least for the time being (until somebody gets around to implementing unlinked browsers on Android as well) an unloaded tab on Android can be recognised by looking for tab.browser.__SS_restore and/or tab.browser.getAttribute("pending").
As for the actual act of discarding/restoring a tab, the tab object on Android has "zombify"/"unzombify" methods (https://dxr.mozilla.org/mozilla-central/rev/96e18bec9fc8a5ce623c16167c12756bbe190d73/mobile/android/chrome/content/browser.js#3813) which will do all the necessary work.
Also, I've no idea in how far this might be relevant, but zombifying a tab involves destroying the original browser, so any event listeners that were attached directly to that browser become invalid. We've got TabPreZombify/TabPostZombify events so anybody affected can remove and re-add its event listeners again.

Updated

19 days ago
Duplicate of this bug: 1377733
You need to log in before you can comment on or make changes to this bug.