Re: [web-nfc] Simplify scan() (#569)

No, let's not do that please - multiple reasons :-)

1. `scan` initiates polling and that is also needed for writing, so this would screw up letting people in control of what is happening and easily implement timeouts, ignore reads while writing etc.

It is also needed for TNEP communication, which is not a just-read-one-value and your are done mode.

2. That is needed as we are not doing 1. 

Not sure about 3. with the above answers.

With all of that said, today `write()` has a bit of magic which might be fine for the simple case, ie. it basically does what you suggest `scan()` would do above.

Another option would be doing similar (and similar to what we wanted to do for GeolocationSensor which got abandoned for now) - ie adding the convenience of a `read()` method that does a single read. Then in return, rename `scan()` to `start()` and add a `stop()`

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

Received on Thursday, 30 April 2020 18:44:31 UTC