WICG / WICG/webmonetization

[browser extensions API] define the scope of onStarted/onStopped events

Open
#655 1 comment 0 reactions 1 assignee View on GitHub

@MichaelKohler is already working on this.

Since Sep 18, 2026.

specification
Dominant language
HTML
Stars
607
Forks
166
Avg merge
2d 7h
Merged PRs (30d)
7

Description

Monetization extension APIs define onStarted and onStopped notifications, which fire when monetization turns on or off. The open question is when exactly these notifications should be emitted. There are three possible models:

  • Tied to a monetization session. Fired once per monetization link. For example, if a single document contains multiple monetization links, multiple onStarted events would fire.
  • Tied to a monetized document. Fired once per monetized document. For example, if a document contains multiple monetization links, onStarted would fire when the first link becomes monetized, and onStopped would fire when the last monetized link stops. However, this could still fire multiple times within a tab if the tab contains multiple iframe documents, since events would be scoped per DOM document.
  • Tied to a tab. Fired once per tab. Regardless of how many iframe documents exist in the tab, onStarted would fire when the first monetization link becomes active anywhere in the tab, and onStopped would fire when the last active monetization in the tab ends.

We should first define the use cases these notifications are meant to support, or consider whether an extension would ever need this information at all:

  • Monetization session: website wallet address + monetized document URL + tab URL
  • Monetized document: monetized URL + tab URL
  • Monetized tab: tab URL

See https://github.com/WICG/webmonetization/pull/653#discussion_r3009294472

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.