Re: [web-nfc] Do we need to compare the ScanOptions? (#557)

Thanks for explanation @zolkis, and there still is a unclear point here for the "filter". Does the "filter" include |signal| field?
A CL https://chromium-review.googlesource.com/c/chromium/src/+/2145263 has been uploaded to support successive scan().
It makes the previous signal functional if no successive signals passed. Is this OK?
```
nfc_test(async (t, mockNFC) => {
  const reader = new NDEFReader();
  const controller = new AbortController();
  const scanOptions1 = {recordType: "url", signal: controller.signal };
  const scanOptions2 = {recordType: "mime"};

  await reader.scan(scanOptions1);
  const promise = reader.scan(scanOptions2);
  controller.abort();

  await promise_rejects_dom(t, 'AbortError', promise);
}, "Aborting on previous signal can stop current reading if no new signals \
passed to successive scan().");
```


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

Received on Friday, 10 April 2020 08:32:06 UTC