Abort-controller
abort-controller
An implementation of WHATWG AbortController interface.
The AbortController interface allows us to abort one or more DOM requests as per the need.
From the sepc:
The AbortController() constructor, when invoked, must run these steps:
Let signal be a
new AbortSignalobject.Let controller be a
new AbortControllerobject whose signal is signal.Return controller.
The signal attribute’s getter, when invoked, must return the context object’s signal.
The abort() method, when invoked, must signal abort on the context object’s signal.
Get it: npm install abort-controller
Usage:
1 2 3 4 5 6 | |
1 2 3 4 5 6 7 8 9 10 | |
GIF FTW!
