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

Re: [sensors] https://w3c.github.io/sensors/#construct-sensor-object is doing weird things with frequency

From: Tobie Langel via GitHub <sysbot+gh@w3.org>
Date: Fri, 02 Sep 2016 13:02:32 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-244368607-1472821350-sysbot+gh@w3.org>
Would changing the [init 
dictionary](https://w3c.github.io/sensors/#dictdef-sensoroptions) like
 so fix the issue?

```webidl
dictionary SensorOptions {
  double? frequency = null;
};
```

The intent is for `frequency` to be `null` unless specified by the API
 consumer. I wrongly(?) assumed `double?` by itself defaulted to 
`null` if not value was set.

As a sidenote, sorry for not being more reactive on this front, but 
I'm still [in between 
contracts](https://lists.w3.org/Archives/Public/public-device-apis/2016Jun/0041.html)
 here.

-- 
GitHub Notification of comment by tobie
Please view or discuss this issue at 
https://github.com/w3c/sensors/issues/125#issuecomment-244368607 using
 your GitHub account
Received on Friday, 2 September 2016 13:02:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:34:21 UTC