Re: [sensors] DOMExceptions when calling stop/start on already stopped/started sensor

I hate the current way it is working, especially if you deal with 
multiple sensors which you want to start and stop. Also having to 
check if it is one of two different states before being able to stop 
is just bad :-)

In JS - unless in strict mode - minor mistakes are just ignored and 
don't throw.

Examples:
```
delete Object.prototype; // doesn't delete, just ignored
var obj1 = {};
Object.defineProperty(obj1, "x", { value: 42, writable: false });
obj1.x = 9; // ignored

// Assignment to a getter-only property
var obj2 = { get x() { return 17; } };
obj2.x = 5; // ignored
```
Stopping something which is already stopped (or starting something 
which is started) I don't even consider a mistake, most of the time 
you just want to ensure something is stopped and don't care if it 
already is (or you want to start something if it isn't started).

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

Received on Thursday, 26 January 2017 20:31:32 UTC