Skip to content

GlobalEventHandlers: onmonetization

The onmonetization attribute of the GlobalEventHandlers 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