w3c / web-nfc

Web NFC
https://w3c.github.io/web-nfc/
Other
311 stars 68 forks source link

Cancel Scan() #619

Closed sc-rf closed 2 years ago

sc-rf commented 3 years ago

I am working on intercepting the nfc data in a Reactjs (typescript) App, but when i change the route the Scanner still intercepting the NFC tag (and i want it to cancel the Listener when i change the page)

lyellick commented 3 years ago

Can you show how you are initializing NDEFReader()? Also to be clear we aren't talking about AbortController(), right?

beaufortfrancois commented 3 years ago

@sc-rf Does https://web.dev/nfc/#abort-nfc-operations help?

kenchris commented 2 years ago

This is doable with AbortController