Returns an AbortSignal
that aborts when the promise is resolved or rejected.
// Remove event listener after the animation is complete
window.addEventListener('keydown', cancelAnimation, {
signal: signalFromPromise(animationPromise)
});
Type: Promise
The promise to watch for resolution or rejection.