-
Notifications
You must be signed in to change notification settings - Fork 0
Event_Listeners
Neila edited this page Aug 13, 2024
·
1 revision
<button $click={event => {
doSomething();
}}>
Click here!
</button>
<button capture$click={event => {
doSomething();
}}>
Click here!
</button>
Other options like passive
, once
are like capture
, use ...$event
to declare.
<button capture_once$click={event => {
doSomething();
}}>
Click here once!
</button>
The order has no impact.
const signal = new AbortSignal();
<button $click={[event => {
doSomething();
}, signal]}>
Click here!
</button>