Re: [sensors] Should the enum SensorState have nosensor ?

It might not be possible to implement the constructor in a 
non-blocking manner if we require implementations to throw a 
`TypeError` if there's no sensor, as spec'd in the [Construct Sensor 
Object][1]:

`5. Otherwise, throw a TypeError.`

Figuring out whether there's underlying sensor hardware requires 
crossing process boundary (at least in Blink, and I guess similarly in
 other modern engines) and [sync IPC should be avoided][2].

That said, @riju and @alexshalamov will experiment with Blink to see 
if this implementation feedback should motivate spec changes and will 
update this issue accordingly.

[1]: https://w3c.github.io/sensors/#construct-sensor-object
[2]: 
https://docs.google.com/document/d/1dixzFzZQW8e3ldjdM8Adbo8klXDDE4pVekwo5aLgUsE/

-- 
GitHub Notification of comment by anssiko
Please view or discuss this issue at 
https://github.com/w3c/sensors/issues/104#issuecomment-219403916 using
 your GitHub account

Received on Monday, 16 May 2016 11:24:49 UTC