W3C home > Mailing lists > Public > public-device-apis-log@w3.org > September 2016

Re: [sensors] LaughometerSensor vs Laughometer?

From: Marcos Cáceres via GitHub <sysbot+gh@w3.org>
Date: Wed, 14 Sep 2016 05:07:45 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-246907779-1473829663-sysbot+gh@w3.org>
WebIDL now supports namespaces, so you could get a real "sensors" 
namespace... however, I'm not sure why WebIDL namespaces are currently
 limited to operations (and don't seem to allow attributes, which 
would serve as the constructors)? @domenic, is something funky about 
the API design here? 

As currently proposed (using `Sensors.whatevs`) in the OP, the 
constructors would be statics on the Sensor interface, which is not 
really what we want IMO. I think we want @rwaldron's design of, for 

const acc = new sensors.Accelerometer();

GitHub Notification of comment by marcoscaceres
Please view or discuss this issue at 
https://github.com/w3c/sensors/issues/127#issuecomment-246907779 using
 your GitHub account
Received on Wednesday, 14 September 2016 05:07:54 UTC

This archive was generated by hypermail 2.4.0 : Monday, 4 July 2022 12:47:52 UTC