Re: [magnetic field event] Proposal for magnetic field event

On Monday, December 24, 2012, Ray You wrote:

>  Hi all,
>
> Here is my proposal for magnetic field event: [1]. Implementation is at
> [2].
>
> Your thoughts are welcome.
>
>
> [1] https://wiki.mozilla.org/Magnetic_Field_Events
>
> [2] https://bugzilla.mozilla.org/show_bug.cgi?id=802004
>

My feedback is the same feedback that I gave for both the Proximity and
Ambient Light events proposals, which can be read here:

http://lists.w3.org/Archives/Public/public-device-apis/2012Dec/0024.html

And more thoroughly described here:

http://lists.w3.org/Archives/Public/public-device-apis/2012Dec/0060.html

These APIs absolutely need to move away from copying the DeviceOrientation
and DeviceMotion specs. Sensors should be constructable objects with get
accessor properties that expose the current value of whatever the sensor is
reading. Sensors should inherit EventTarget to allow registration of event
handlers for value change events.

"window" is not logically the entity for which these events have occurred,
so dispatching the event to the window doesn't make sense.



Rick



>
>
> --
>
> Best regards,
> 尤睿(Ray You)
>
>

Received on Friday, 28 December 2012 18:41:11 UTC