tabs.onUpdated should have a filter template like webRequest.onBeforeRequest

REOPENED
Unassigned

Status

()

Toolkit
WebExtensions: Untriaged
P2
normal
REOPENED
5 months ago
16 days ago

People

(Reporter: 21Naown, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [design-decision-approved][tabs])

(Reporter)

Description

5 months ago
If you are not restricted by Chrome's specs, what about add a filter similarly to https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/webRequest/onBeforeRequest#Parameters ?
To raise only event(s) we need.
Whiteboard: [design-decision-needed]

Updated

4 months ago
Whiteboard: [design-decision-needed] → [design-decision-needed][tabs]
Hi @21Naown, this has been added to the agenda for the May 9 WebExtensions triage meeting. Would you be able to join us? 

Wiki: https://wiki.mozilla.org/Add-ons/Contribute/Triage

Agenda: https://docs.google.com/document/d/1q7UD3DxsT5z0lO3EbOyF9Iln32Wg_e9LYMdHZ80BEb4/edit#heading=h.34n4lirhljve
(Reporter)

Comment 2

19 days ago
Hello, I will not be able to join the meeting you mentioned. Thank you for proposing to me!
Flags: needinfo?(amckay)

Comment 3

18 days ago
In the tabs.onUpdated event you can examine the tabs and decide which tab to process and which tab to ignore. It might make it a few lines of code shorter, perhaps, but then there's a whole filter syntax we have to maintain long term when a few lines of JS would work.

It might save a little bit of time because the WebExtension code no longer needs to call the extension. But that seems like a very minimal win for something that doesn't get called as much as, say the webRequest API.

Since this can already be done and doesn't offer any performance benefit but does increase code maintainence this doesn't seem worth it.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 18 days ago
Flags: needinfo?(amckay)
Resolution: --- → WONTFIX
This will actually help us a lot with performance, since we wind up sending huge numbers of these events even when most of them aren't needed, so I'd like us to implement it.
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: WONTFIX → ---
Priority: -- → P2
Whiteboard: [design-decision-needed][tabs] → [design-decision-approved][tabs]
You need to log in before you can comment on or make changes to this bug.