onmonetization event handler
HTML DOM API
By creating an onmonetization
event handler, your web page can programmatically respond to monetization
events.
window.onmonetization
The onmonetization
event handler is used by the Web Monetization agent to process monetization
events sent to the browser window
(the event target).
The onmonetization
property can be applied to any element and is used by the browser to notify that some <link>
element is monetized.
In a tabbed browser, each tab is represented by its own window
object.
Syntax
Where functionRef
is the event handler function to execute when a monetization
event fires.
Example
Show a message to site visitors to let them know that your page supports Web Monetization.
Specifications
Specification |
---|
Web Monetization #onmonetization-event-handler |