WICG / webmonetization

Proposed Web Monetization standard
https://webmonetization.org
Other
457 stars 153 forks source link

Link headers - where to emit monetization/error events? #343

Open sublimator opened 1 year ago

sublimator commented 1 year ago

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