WICG / WICG/webmonetization

Link headers - where to emit monetization/error events?

Open
#343 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Link: <https://ilp.uphold.com/gRa4mXFEMYrL>; rel="monetization"

Where to emit the events from when link is specified as a header

monetization event target

You have your choice of ancestors for a 'monetization' EventTarget: document and/or window
But for errors?

error event target

Note that window already emits an 'error' event. The WM 'error' event is currently simply Event('error') with no "distinguishing marks". But the window event has marks (message, filename, etc) that make it distinct from a humble Event('error') ? Yeah, but existing code?

Some solution options
  1. Forget headers, they aren't all that!
  2. Just don't worry about errors when a link is specified via headers!
  3. 'error' -> 'monetizationerror' ?
  4. 'monetization' "bag of fields" event with error on it ?
  5. insert your favourite ???

Originally from 1 / 2 / 3 / 4 / 5

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.

Research direction

Review the Link header and Web Monetization event behavior described in the issue, then read the linked pull-request discussions and prior issue. Resolve which EventTarget should receive monetization and error events and how those events should be distinguished. Done means the specification has an agreed, documented behavior for header-specified links and errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.