@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
Parameter | Type | Description |
---|---|---|
type | string | The type name of the event. |
detail | any | The event detail object to send with the event. |
options | Omit<CustomEventInit, "detail"> | The event options. By default bubbles and composed. |
void | boolean
Remarks
Only emits events if connected.