You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A response can have an associated termination reason which is one of end-user abort, fatal, and timeout.
By "end-user" I presume it means the user who's browsing the web page that's using fetch (possibly by hitting Esc or closing the page?). But what interests me is: can the request be aborted from the same code that initiated it, for the purpose of e.g. aborting a request when it's being replaced with a newer request as a result of repetitive user interaction such as keystrokes in an input field?
If not, what are our options for discarding the outcome of a fetch that we're not interested in anymore? Thanks
This is a good question. The only uses of jQuery's $.ajax that we haven't been able to replace with window.fetch on github.com are the abort-current-request-replace-with-new-request scenarios.
Either that or email the WHATWG list. I suspect we might end up putting a method on Request. It's a bit unclear still what the desirable pattern for cancelable promises is.
The spec says:
By "end-user" I presume it means the user who's browsing the web page that's using
fetch
(possibly by hittingEsc
or closing the page?). But what interests me is: can the request be aborted from the same code that initiated it, for the purpose of e.g. aborting a request when it's being replaced with a newer request as a result of repetitive user interaction such as keystrokes in an input field?If not, what are our options for discarding the outcome of a
fetch
that we're not interested in anymore? Thanks/cc @annevk
The text was updated successfully, but these errors were encountered: