Re: [web-nfc] Fix #592: new scan rejects if pending scan exists (#611)

I believe the `pending read tuple` should be per reader.
This is not what I'm understanding with latest patch.

See JS code below for my expectations.

 ```js
const ndef1 = new NDEFReader();
await ndef1.scan(); // Promise resolves and reading occurs...
ndef1.onreading => ({message}) => { /* Handle NDEF message */}

// few seconds later
const ndef2 = new NDEFReader();
await ndef2.scan(); // Promise resolves and reading occurs
ndef2.onreading => ({message}) => { /* Handle NDEF message */}

// ndef2 will get reading events.
// ndef1 will also continue to get reading events.
```

```js
const ndef = new NDEFReader();
const p1 = ndef.scan(); // Promise resolves.
const p2 = ndef.scan(); // Promise rejects right away as there's already a pending scan request
```

-- 
GitHub Notification of comment by beaufortfrancois
Please view or discuss this issue at https://github.com/w3c/web-nfc/pull/611#issuecomment-747549409 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 17 December 2020 16:27:07 UTC