add support for aborting via AbortController
- Lenguaje dominante
- JavaScript
- Estrellas
- 5.7k
- Forks
- 204
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
https://developers.google.com/web/updates/2017/09/abortable-fetch
Currently it is only implemented in Firefox 57 and is coming to other browsers soon.
```javascript
const controller = new AbortController();
const signal = controller.signal;
setTimeout(() => controller.abort(), 5000);
fetch(url, { signal }).then(response => {
return response.text();
}).then(text => {
console.log(text);
});
```
Will most likely need to implement another npm package that just include `AbortController` package. I found one but it also pollyfills fetch. https://github.com/mo/abortcontroller-polyfill
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.