- From: Zoltan Kis via GitHub <sysbot+gh@w3.org>
- Date: Wed, 14 Oct 2020 07:55:33 +0000
- To: public-web-nfc@w3.org
Let's have some JS examples for option 2 above. [Example 4]() has to use `ignoreRead`, with option 2 `ignoreRead` is not needed.
```javascript
navigator.nfc.scan(); // start NFC polling
navigator.nfc.ontagfound = event => {
if (event.ndef) {
event.ndef.write(data).then({
console.log("Tag written");
});
ndef.read().then( message => {
});
}
}
```
--
GitHub Notification of comment by zolkis
Please view or discuss this issue at https://github.com/w3c/web-nfc/issues/602#issuecomment-708229437 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 14 October 2020 07:55:35 UTC