Closed Bug 1772619 Opened 3 years ago Closed 3 years ago

sessions.Filter should support more options

Categories

(WebExtensions :: General, enhancement)

enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: kernp25, Unassigned, NeedInfo)

Details

By working on bug 1392125 and looking for browser.sessions.getRecentlyClosed(), i noticed that most add-ons only seems to using the tabs and not the windows (the windows will be filtered out) that are returned by browser.sessions.getRecentlyClosed().

So my idea is:

browser.sessions.getRecentlyClosed({tabs: true})

will only return tabs and

browser.sessions.getRecentlyClosed({windows: true})

only returns windows.

What do you think?

Flags: needinfo?(rob)

Do you also think this should be supported?

Flags: needinfo?(Manuel.Spam)

I'm clearing the needinfo since the feature request will be triaged during the regularly scheduled bug triage meeting.

Flags: needinfo?(rob)
Flags: needinfo?(Manuel.Spam)

Actually the reason why I filter out windows completely is that the API had some issues when I last tried it.

When I last tried it, it was impossible to get the title of closed windows (and so anything that can be used to represent the window in a menu or list).

But this all actually is IMHO a minor problem. Filtering out windows is not a big deal. A real problem, for me, is that Bug 1538119 still did not get too much attention. As the API currently is broken by this I had to set up a really ugly workaround (https://github.com/M-Reimer/undoclosetab/blob/master/tabhandling.js#L143-L171) which then brings its own new issues.

Can you please provide a use case for this, since most existing extensions will not be updated to filter out only tabs/windows?

Flags: needinfo?(kernp25)

This seems like the needed functionality can already be achieved by existing API. Closing as wontfix, but feel free to reopen if you have a use case that doesn't have a workaround.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.