Re: [web-nfc] What is the correct way to check whether the browser supports Web NFC API or not? (#434)

Indeed!
```js
if ('NDEFReader' in window) { /* ... Scan NDEF Tags */ }
if ('NDEFWriter' in window) { /* ... Write NDEF Tags */ }
```
You can also use Permissions API
```js
try {
  const status = await navigator.permissions.query({ name: 'nfc'});
}
catch(e) {
  // No Web NFC support
}
```

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

Received on Tuesday, 5 November 2019 10:37:15 UTC