Skip to content
Web Monetization logo Web Monetization
GitHub

GlobalEventHandlers: onmonetization

The onmonetization attribute of the GlobalEventHandlers Describes event handlers common to several interfaces like HTMLElement, Document, or Window mixin is used to process monetization events sent to the Window.

onmonetization can be applied to any element and is used by the user agent (such as a web browser or WM agent) to notify that some <link> element is monetized.

Syntax

window.onmonetization = functionRef

Example

Show a visitor an alert box and message when a Web Monetization event is triggered.

window.onmonetization = function () {
  alert('This page supports Web Monetization.')
}

Specifications