API Reference > bentleyjs-core > Events > BeEvent BeEvent<T extends Listener> Class Manages a set of listeners for a particular event and notifies them when the event is raised. This class is usually instantiated inside of a container class and exposed as a property for others to subscribe via BeEvent.addListener. Extended by BeUiEvent Methods Name Description addListener(listener: T extends Listener, scope?: any): () => void Registers a Listener to be executed whenever this event is raised. addOnce(listener: T extends Listener, scope?: any): () => void Registers a callback function to be executed only once when the event is raised. clear(): void Clear all Listeners from this BeEvent. has(listener: T extends Listener, scope?: any): boolean Determine whether this BeEvent has a specified listener registered. raiseEvent(...args: any[]): void Raises the event by calling each registered listener with the supplied arguments. removeListener(listener: T extends Listener, scope?: any): boolean Un-register a previously registered listener. Properties Name Type Description numberOfListeners Accessor ReadOnly number The number of listeners currently subscribed to the event. Defined in core/bentley/src/BeEvent.ts Line 24 Last Updated: 13 June, 2024