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

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