Re: [web-nfc] Consider using AbortController rather than a stop() method (#225)

Coming back to the initial question of the present issue, I think a `stop()`—or `release()` or `cancel()` or whatever makes sense in the concrete context—method would have been cleanest, but I guess this discussion dates back to https://github.com/whatwg/fetch/issues/27 and also https://github.com/tc39/proposal-cancelable-promises, and in the end `AbortController` was what was agreed on.

As @jakearchibald wrote on [Web Fundamentals](https://developers.google.com/web/updates/2017/09/abortable-fetch#reacting_to_an_aborted_fetch): *"You don't often want to show an error message if the user aborted the operation, as it isn't an "error" if you successfully do that the user asked. To avoid this, use an if-statement […] to handle abort errors specifically."*

Anyway, +1 for consistency and `AbortController`.

-- 
GitHub Notification of comment by tomayac
Please view or discuss this issue at https://github.com/w3c/web-nfc/issues/225#issuecomment-518802902 using your GitHub account

Received on Tuesday, 6 August 2019 19:07:24 UTC