@microsoft/fast-element > listener
listener() function
Creates an event listener binding.
Signature:
export declare function listener<T = any>(expression: Expression<T>, options?: AddEventListenerOptions): Binding<T>;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
expression |
Expression<T> |
The binding to invoke when the event is raised. |
|
options |
AddEventListenerOptions |
(Optional) Event listener options. |
Returns:
Binding<T>
A binding configuration.