sensors
sensors copied to clipboard
getAll()?
Why is this preferred over list()?
For consistency, see the last part of my comment here: https://github.com/w3c/sensors/issues/26#issuecomment-109931182
I've been getting ERR_CONNECTION_TIMED_OUT for two of those links for about an hour.
- https://url.spec.whatwg.org/#dom-urlsearchparams-getallname
- https://fetch.spec.whatwg.org/#dom-headers-getall
From the Headers#getAll docs on MDN, it appears that the Headers class produces a Map-like (multi-Map-like?) object:

getAllis method of the instance, not a static class method.getAllis a synchronous operation
URLSearchParams appears to be the same design?
I don't agree that Sensor has any consistency obligation here.
I've been getting ERR_CONNECTION_TIMED_OUT for two of those links for about an hour.
Weird. They seem to WFM.
getAll is method of the instance, not a static class method.
Right. But depending on the outcome of #28 and some possible design around that, Sensor.getAll() could very well end up as an instance method exposed on the sensors attribute of the Global object (just a thought). See, for example, the Clients interface in ServiceWorkers.
That said, I don't think it's worth looking too closely at the details right now, at least not until we solidify the overall architecture.
I don't agree that Sensor has any consistency obligation here.
I don't like to look at consistency as an obligations, but as weight you put in the balance when designing APIs. Something that's voluntarily inconsistant with other parts of the platform better have good reasons to be so.
I agree those are the wrong examples. Clients and Notification might be more likely?