W3C home > Mailing lists > Public > public-device-apis-log@w3.org > March 2017

Re: [sensors] Find a better name for 'unconnected' state

From: Tobie Langel via GitHub <sysbot+gh@w3.org>
Date: Fri, 31 Mar 2017 12:40:02 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-290701093-1490964000-sysbot+gh@w3.org>
@dontcallmedom well, it's certainly a state we need internally.

I guess what you're hinting at is whether it should be exposed at all.

I think it's a lot easier if we have parallelism between internal and exposed states, and I also think we do need to have some state displayed. Arguably, that *could* be in the form of a boolean "activated" attribute. Would that be better? It would certainly match the `onactivate` handler.

```webidl
[SecureContext]
interface Sensor : EventTarget {
  readonly attribute Boolean activated;
  readonly attribute DOMHighResTimeStamp? timestamp;
  void start();
  void stop();
  attribute EventHandler onchange;
  attribute EventHandler onactivate;
  attribute EventHandler onerror;
};
```

-- 
GitHub Notification of comment by tobie
Please view or discuss this issue at https://github.com/w3c/sensors/issues/160#issuecomment-290701093 using your GitHub account
Received on Friday, 31 March 2017 12:40:11 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 12:18:52 UTC