event - Windower/packages GitHub Wiki

This library provides an implementation of an event mechanism. It allows registering functions to execute on certain events, and triggering those events, both within an addon and from a service to an addon and even between addons.

local event = require('event')

✔️ Dependency Not Required

This library does not require an explicit dependency in the manifest.xml file for your package.

Tables

The event table has the following entries:



event.new

Creates a new event object, which can then be used to trigger the event, and which can be sent to other instances so they can register functions to execute when triggered.

Definition

function event.new() : event_object

Parameters

Return

event_object event_object

The event object associated with the specified name. Can be used to register functions to specific commands.

⚠️ **GitHub.com Fallback** ⚠️