Skip to content
GitLab
    • Why GitLab
    • Pricing
    • Contact Sales
    • Explore
  • Why GitLab
  • Pricing
  • Contact Sales
  • Explore
  • Sign in
  • Get free trial
  • Adblock incAdblock inc
  • ExtensionsExtensions
  • Adblock PlusAdblock Plus
  • adblockplusuiadblockplusui
  • Issues
  • #1275

Make filter composer opening compatible with service worker

Background / User story

Manifest v3 forces us to run our background scripts in a service worker, which can be suspended/terminated at any time. Therefore we have to make sure that we add all event listeners synchronously, or they may not be called when the service worker activates.

Potential breakage:

  • Filter composer window is not being initialized.
  • Filter composer window doesn't close when the tab closes.

What to change

  • Design: N/A
  • Research: N/A
  • Spec: N/A
  • Legal: N/A
  • Development: Adjust code to add all event listeners synchronously:
    • browser.*.addListener()
      • lib/filterComposer: "composer.openDialog"
        • tabs.onRemoved
          notify composer window that tab was closed
        • tabs.onUpdated
          determine whether composer window has loaded

Hints for testers

See list of potential breakage under "Background".

Hints for translators

N/A

Further information

See also ui#1070 for information on which code is run on service worker activation.

Edited Oct 31, 2022 by Thomas Greiner
Assignee
Assign to
Time tracking