W3C home > Mailing lists > Public > public-device-apis@w3.org > June 2015

Re: [sensors] Dependency on [DOM] due to inheriting from EventTarget

From: Rick Waldron via GitHub <sysbot+gh@w3.org>
Date: Wed, 17 Jun 2015 16:49:24 +0000
To: public-device-apis@w3.org
Message-ID: <issue_comment.created-112874465-1434559763-sysbot+gh@w3.org>
@zenparsing if the web had EventEmitter and all sensor classes where 
subclasses of EventEmitter, your example would become: 

```js
sensor.once("change", x => {
  // do whatever, but only once
});
```





-- 
GitHub Notif of comment by rwaldron
See https://github.com/w3c/sensors/issues/21#issuecomment-112874465
Received on Wednesday, 17 June 2015 16:49:25 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:54:05 UTC