- From: Mark R. James via GitHub <sysbot+gh@w3.org>
- Date: Mon, 05 Oct 2015 15:37:33 +0000
- To: public-web-nfc@w3.org
Further comments by a Mozilla engineer at w3ctag/promises-guide#44 have cast doubt on the earlier microtask statements. The event loop could still be running on unload. I'd prefer the Web NFC API to confine itself to what API users will experience, rather than describing the NFCAdapter object release process. For example, if we don't want to support synchronous AJAX calls during unload, which are the only useful things than can be done during unload, but which disgust the promise-guide guys, the section could read... <hr> ### 10.4 Response to Document Unload Once a Document is to be unloaded (its browsing context has either been closed or has been navigated away from the Document, and the unload has not been canceled by a user prompt requested by a beforeunload handler), the adapter is suspended, and any pending requestAdapter(), pushMessage(), or watch() promises, as well as any pending Web NFC promises created in event handlers during the unload process, remain pending during the remainder of script execution. If a Web NFC message is being transmitted at the time an unload is initiated, transmission of that message is stopped. [can native do this?] <hr> By the way, in [Section 10.3](https://w3c.github.io/web-nfc/#handling-window-visibility-and-focus), where it says that on suspension "no NFC content is pushed", it should be made clear whether this means no *new* NFC content is pushed, or whether in-progress transmissions are also terminated or suspended. Ditto for cancelPush(). -- GitHub Notif of comment by mrj See https://github.com/w3c/web-nfc/issues/57#issuecomment-145573484
Received on Monday, 5 October 2015 15:37:35 UTC