Re: [web-nfc] Should NFCPushOptions.timeout be an implementation-dependent value or defined?

AFAIK there is no underlying platform convention and default wrt 
timers used with NFC on either of the platforms we target. Timeouts 
are only used with the Web NFC API, and the timers will likely be 
implemented on native side. Therefore a default value for timeouts is 
a matter of choice and it can be well standardized and be uniform 
across browsers. Since that number is arbitrary, it will always be a 
question why 10 seconds and not 8 seconds, but I would argue that a 
choice made is better than a choice left open for uncertainty.

The current API does indeed allow ```Infinity``` as a value for 
timeout. The spec does not specify what happens if the implementation 
cannot respect the value given by the developer.

I think we could include a Note saying that the value of 
```Infinity``` is allowed (or not, votes pending).

Also, in the steps we should specify the behavior when the user agent 
cannot respect the values provided by developers for any reason, or 
specific reasons.

Note that the spec does not handle any corner case behavior e.g. when 
the platform would actually have hard-coded timeout with NFC 
operations that are smaller than developer-specified values. The API 
could include new method for fetching the platform dependent timeout 
value, and specify what happens in these conditions. So far this seems
 not a valid case. But should it occur later, the suggestion above 
should also cover this.



-- 
GitHub Notif of comment by zolkis
See https://github.com/w3c/web-nfc/issues/49#issuecomment-140674192

Received on Wednesday, 16 September 2015 08:46:33 UTC