Re: [sensors] Don't allocate response objects to avoid triggering GC

Taking the above comments in consideration, here's a new take at the 
WebIDL for this:

interface Sensor : EventTarget {
  readonly attribute SensorState state;
  readonly attribute DOMHighResTimeStamp lastUpdatedAt; // better 
  readonly attribute DOMHighResTimeStamp timeOrigin;
  void start();
  void stop();
  attribute EventHandler onchange; // onupdate? onread? onreading? 
  attribute EventHandler onactivate;
  attribute EventHandler onerror;

dictionary SensorOptions {
  double? frequency;

// E.g. for Gyroscope

[Constructor(SensorOptions options)]
interface Gyroscope : Sensor {
  readonly attribute unrestricted double? x;
  readonly attribute unrestricted double? y;
  readonly attribute unrestricted double? z;

GitHub Notification of comment by tobie
Please view or discuss this issue at using
 your GitHub account

Received on Sunday, 18 December 2016 11:32:59 UTC