Skip to content

Commit 1d3e7a3

Browse files
Update README
1 parent 237ca2d commit 1d3e7a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ await eventTarget.AddEventListenerAsync("pointermove", callback);
4343
await eventTarget.AddEventListenerAsync("pointerup", callback);
4444
await eventTarget.AddEventListenerAsync("pointerleave", callback);
4545
```
46-
The above sample serves as an imperative alternative to the the native way to listen to events. But it also opens up for controlling some of the options available on events like preventing the default behavior programmatically. In the above example we use this on a `ElementReference`, but we can create an `EventTarget` from an `IJSObjectReference` instead which means we can listen for events happening on any JS object that emits events.
46+
The above example serves as an imperative alternative to the the native way to listen to events. But it also opens up for controlling some of the options available on events like preventing the default behavior programmatically. In the above example we use this on a `ElementReference`, but we can also create an `EventTarget` from an `IJSObjectReference` instead which means we can listen for events happening on any JS object that emits events.
4747

4848
# Aborting
4949
In JS the counterpart to a `CancellationTokenSource` is called an `AbortController`. Like we can get a `CancellationToken` from an `CancellationTokenSource` in .NET we can get an `AbortSignal` from an `AbortController` in JS. Multiple standard APIs and libraries allow us to parse an `AbortSignal` to functions to be able to stop some long-running action.

0 commit comments

Comments
 (0)