- From: Wanming Lin via GitHub <sysbot+gh@w3.org>
- Date: Thu, 26 Sep 2019 09:16:49 +0000
- To: public-web-nfc@w3.org
Looks like there's a bug in your code, per the old spec at https://cdn.staticaly.com/gh/w3c/web-nfc/336e6afe18470caeca47967413acb39a34c86fcd/index.html#the-nfcmessage-dictionary, in following code snippet, `message.data[0]` is undefined, it should be `message.records[0]`
```
if (message.data[0].recordType === "empty") {
navigator.nfc.push([{
url: message.url,
data: [{
recordType: "text",
data: "Hello World"
}]
}]);
}
```
--
GitHub Notification of comment by Honry
Please view or discuss this issue at https://github.com/w3c/web-nfc/issues/358#issuecomment-535416742 using your GitHub account
Received on Thursday, 26 September 2019 09:16:50 UTC