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

Re: [sensors] Agree on event names

From: Anssi Kostiainen via GitHub <sysbot+gh@w3.org>
Date: Mon, 29 May 2017 13:29:50 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-304661553-1496064589-sysbot+gh@w3.org>
I could live with `onreading` as the event handler and `reading` as the event handler event type:

```
sensor.onreading = () => { doStuff(); };

sensor.addEventListener("reading", doStuff);
```

The above reads a bit like prose, while with the current names it is not clear what the change is about:

```
sensor.onchange = () => { doStuff(); };

sensor.addEventListener("change", doStuff);
```

-- 
GitHub Notification of comment by anssiko
Please view or discuss this issue at https://github.com/w3c/sensors/issues/205#issuecomment-304661553 using your GitHub account
Received on Monday, 29 May 2017 13:29:57 UTC

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