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

OK, so close this off and with my active editor hat on, I am making an executive decision that we move ahead with the rename to "scan" and integration with `AbortController`

Some of my reasoning.

`scan` is a fine name and it aligns better with `push`, like we don't have NFCWriter.write as it doesn't write immediately (sense push), and so NFCReader.read would be confusing as it is not reading immediately and can do multiple reads... hense scan/push fits well with the nature of NFC

AbortController is already being used in the NFCWriter.push, so it is quite consistent with the spec itself, as well as with multiple other modern specs. This is the new way we do things, whether you are a fan of AbortController or not.

You could argue that that is not used by Generic Sensors, but I would argue that it would have been if they were designed today, and still might be for the GeolocationSensor.

For me personally, it also seem quite nice to be able to use one signal to cancel multiple things in a single-page application when switching views, without requiring having access to all kind of internal state of the views that are now being hidden.

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

Received on Monday, 19 August 2019 12:59:04 UTC