Skip to content

Add web hooks for onDisabled and onUninstalled #980

@carlosjeurissen

Description

@carlosjeurissen

Intro

As follow up for the from the London 2026-04-07 F2F, where we discussed ability to be notified as extension on disabled/uninstalled scenarios was discussed. A few points were raised:

  • Safari considers runtime.setUninstallURL() too invasive
  • Chrome is hesitant to give the exact unload reason for runtime.onInvalidated() (see Update runtime.onInvalidated with unload reason and isolated world restriction #975)
  • Unlike runtime.setUninstallURL() this should be a fixed URL set in the manifest, preventing passing additional user data
  • If passing additional data, a pre-specified payload without replacement variables would be ideal

In addition, I would like to add:

  • The web hooks should not be a replacement for runtime.setUninstallURL() as there would be no way for extension developers to invite users to share uninstalled reasons. Many developers collect this information to improve their products and many users elaborate on there reasoning.

Proposal

Considering this should be in the manifest, and we may want to add more web hooks, having a top level web_hooks object seems to keep the manifest file clean and flexible. Something like:

{
  "web_hooks": {
    "on_disabled": "https://example.com/hooks/on-disabled",
    "on_uninstalled": "https://example.com/hooks/on-uninstalled"
  }
}

Discussion points

  • GET vs POST method / payload
  • on_disabled vs on_disable naming
  • do we indeed want a general web_hooks umbrella object?

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triage: chromeChrome needs to assess this issue for the first timeneeds-triage: firefoxFirefox needs to assess this issue for the first timeneutral: safariNot opposed or supportive from Safaritopic: eventsIssues related to the registration, management, and dispatch of WebExtension events.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions