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

[sensors] Should we use OnErrorEventHandler error handler instead of EventHandler?

From: Alexander Shalamov via GitHub <sysbot+gh@w3.org>
Date: Mon, 03 Oct 2016 09:51:49 +0000
To: public-device-apis-log@w3.org
Message-ID: <issues.opened-180601330-1475488307-sysbot+gh@w3.org>
alexshalamov has just created a new issue for 

== Should we use OnErrorEventHandler error handler instead of 
EventHandler? ==
The HTML5 specification defines 
 that can be used instead of custom “EventHandler onerror”.

The error [event handler processing 
 interface can be simply reused instead defining custom error handling

Modified version of the IDL for the current Generic Sensor API would 
look like:
interface Sensor : EventTarget {
  readonly attribute SensorState state;
  readonly attribute SensorReading? reading;
  void start();
  void stop();
  attribute EventHandler onchange;
  attribute EventHandler onstatechange;
  attribute OnErrorEventHandler onerror;

dictionary SensorOptions {
  double? frequency;

enum SensorState {

interface SensorReading {
  readonly attribute DOMHighResTimeStamp timeStamp;

[Constructor(DOMString type, SensorReadingEventInit eventInitDict)]
interface SensorReadingEvent : Event {
  readonly attribute SensorReading reading;

dictionary SensorReadingEventInit : EventInit {
  SensorReading reading;

Please view or discuss this issue at 
https://github.com/w3c/sensors/issues/137 using your GitHub account
Received on Monday, 3 October 2016 09:51:55 UTC

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