Repository navigation
Firefox add-ons: filters on tabs.onUpdated only for Firefox add-ons - #239
Merged
Merged
Conversation
Violentmonkey 2.50 from the Chrome Web Store tries
tabs.onUpdated.addListener(f, {properties: ["status"]}). In Chrome that
throws, and Violentmonkey then drops the filter argument of every later
call. Since the filters of #30 it didn't throw here, so Violentmonkey
kept the argument, and its next calls pass `isFirefox && filter`, which
is `false` in Chromium. addListener() refused `false` with "Incorrect
argument types for tabs.onUpdated.", so the service worker stopped in its
first line, and neither the dashboard nor the popup worked.
Firefox's filters on tabs.onUpdated and proxy.onRequest are now a Firefox
add-on's alone, as contextMenus' Firefox events are (#228): an extension
without the gecko key keeps Chromium's events, which throw "This event
does not support filters". The bindings don't see the extension, so the
bindings system gives FirefoxUpdateFilters a check of the context
(IsFirefoxAddOnContext).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Violentmonkey 2.50 from the Chrome Web Store stopped working in oganesson. Its service worker died on its first line with
Incorrect argument types for tabs.onUpdated., so the dashboard and popup did nothing.VM checks for filter support with
tabs.onUpdated.addListener(f, {properties: ["status"]}). In Chrome that call throws, and VM then drops the filter argument from every later call. Since #30 the call no longer threw here, so VM kept the argument and later passedisFirefox && filter, which isfalsein Chromium. Thatfalsewas refused.Firefox's filters on
tabs.onUpdatedandproxy.onRequestnow apply only to Firefox add-ons (IsFirefoxAddOn, the gecko key), as #228 did forcontextMenus.onShown. Other extensions keep Chromium's events. The bindings layer can't see the extension, so the bindings system passes it a check of the context (IsFirefoxAddOnContext).Tested in oganesson on a dev build: unmodified VM 2.50.0 works; the new
FirefoxUpdateFilterBindingsTestfails on the 1.20261122175301 release and passes on the fix; the filter, menus-bindings and proxy tests pass; Firefox's 15 ported filter and proxy tests show no single-test drops.check-patchespasses with zero fuzz, and the changed sections apply with zero fuzz on tennessine's Chromium 158.0.8127.42.🤖 Generated with Claude Code