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

`navigator.permissions.query({ name: 'nfc'})` will resolve with a status of "denied".

```js
navigator.permissions.query({ name: "nfc" }).then(permissionStatus => {
  console.log(`NFC user permission: ${permissionStatus.state}`);
  permissionStatus.onchange = _ => {
    console.log(`NFC user permission changed: ${permissionStatus.state}`);
  };
});
```

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

Received on Tuesday, 5 November 2019 12:24:03 UTC