ExEv

(Ex)tended (Ev)ents - provides an API for some missing on-x events

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://greasyfork.org/scripts/403996-exev/code/ExEv.js?version=808391

Author
akuankka128
Ratings
0 0 0
Version
0.1.1
Created
2020-05-23
Updated
2020-05-23
License
N/A
Applies to
All sites

Extended Events

This is an API which covers some of the missing document.on-x events.
Currently supported events are headloaded and bodyloaded.

Example usage:
document.events.on('headloaded', () => {
    let style = document.createElement('style');
    style.innerHTML = "* { outline:.75px solid red; }";
    document.head.appendChild(style);
});