Skip to main content

@microsoft/fast-element > Controller > emit

Controller.emit() method

Emits a custom HTML event.

Signature:
emit(type: string, detail?: any, options?: Omit<CustomEventInit, "detail">): void | boolean;

Parameters

ParameterTypeDescription
typestringThe type name of the event.
detailanyThe event detail object to send with the event.
optionsOmit<CustomEventInit, "detail">The event options. By default bubbles and composed.
Returns:

void | boolean

Remarks

Only emits events if connected.