UnderScript

Various changes to undercards, an undertale fan-made card game.

This project is maintained by feildmaster

plugin.events()

by feildmaster (October 15, 2023)

Listen to and emit events.

Syntax

plugin.events();

Event Methods

Read more

Examples

const plugin = underscript.plugin('My great plugin');
const eventManager = plugin.events();
eventManager.on(':load', () => console.log('Page finished loading'));

// Call a custom event
eventManager.emit('customevent', {foo: 'bar'});
eventManager.on('customevent', (data) => console.log(data.foo)); // output: bar

API Documentation: | UnderScript | Plugin | EventEmitter |