Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/remapper/src/deps.ts>three.EventDispatcher

A framework for Beat Saber map scripting.
Go to Latest
class three.EventDispatcher
Re-export
import { three } from "https://deno.land/x/remapper@2.1.0/src/deps.ts";
const { EventDispatcher } = three;

JavaScript events for custom objects

Constructors

new
EventDispatcher()

Creates eventDispatcher object. It needs to be call with '.call' to add the functionality to an object.

Type Parameters

optional
E extends BaseEvent = Event

Methods

addEventListener<T extends E["type"]>(type: T, listener: EventListener<E, T, this>): void

Adds a listener to an event type.

dispatchEvent(event: E): void

Fire an event type.

hasEventListener<T extends E["type"]>(type: T, listener: EventListener<E, T, this>): boolean

Checks if listener is added to an event type.

removeEventListener<T extends E["type"]>(type: T, listener: EventListener<E, T, this>): void

Removes a listener from an event type.