Re: [web-nfc] Use AbortController/*Signal instead of cancelWatch(optional long id);

This definitely makes sense for push (which I think we should just rename to write to be consistent with Web Bluetooth etc).

This even allows us to get rid of the timeout:

```
const controller = new AbortController();
const signal = controller.signal;

const message = {
  records: [{ recordType: "text", data: 'Hello World' }]
};

navigator.nfc.write(message, {signal});

// timeout after 3 seconds
setTimeout(() => controller.abort(), 3000);
```

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

Received on Thursday, 27 September 2018 08:31:17 UTC