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:

```webidl
[SecureContext]
interface Sensor : EventTarget {
  readonly attribute SensorState state;
  readonly attribute DOMHighResTimeStamp lastUpdatedAt; // better 
name?
  readonly attribute DOMHighResTimeStamp timeOrigin;
  void start();
  void stop();
  attribute EventHandler onchange; // onupdate? onread? onreading? 
onpoll?
  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 
https://github.com/w3c/sensors/issues/153#issuecomment-267816287 using
 your GitHub account

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