Constructors
Properties
off
off: <TData = unknown>(type: string, listener?: (event: TData) => void) => void Type declaration
- <TData = unknown>(type: string, listener?: (event: TData) => void): void
Parameters
- type: string
Optional
listener: (event: TData) => void
Returns void
on
Type declaration
- <TData = unknown, TType extends string = string>(
type: TType,
listener: EventListener<TData, TType>,
thisArg?: ThisType<unknown>,
): void Type Parameters
- TData = unknown
- TType extends string = string
Returns void
once
Type declaration
- <TData = unknown, TType extends string = string>(
type: TType,
listener: EventListener<TData, TType>,
thisArg?: ThisType<unknown>,
): void Type Parameters
- TData = unknown
- TType extends string = string
Returns void
trigger
trigger: <TData = unknown>( event: unknown, eventData?: TData, extras?: { bubbles?: boolean; external?: boolean },) => void Type declaration
- <TData = unknown>(
event: unknown,
eventData?: TData,
extras?: { bubbles?: boolean; external?: boolean },
): void Parameters
- event: unknown
Optional
eventData: TDataOptional
extras: { bubbles?: boolean; external?: boolean }
Returns void
triggerXAPI
triggerXAPI: (verb: XAPIVerb, extra: unknown) => void Methods
createXAPIEventTemplate
- createXAPIEventTemplate<TVerb extends XAPIVerb>(
verb: TVerb,
extra: unknown,
): XAPIEvent Parameters
- verb: TVerb
- extra: unknown
Remove event listener If no listener is specified, all listeners will be removed