Confirmed users
19
edits
mNo edit summary |
|||
| Line 94: | Line 94: | ||
# Create an event that uses the '''DeviceMagneticFieldEvent''' interface, with the name ''devicemagneticfield'', which bubbles, is not cancelable, and has no default action, that also meets the following conditions: | # Create an event that uses the '''DeviceMagneticFieldEvent''' interface, with the name ''devicemagneticfield'', which bubbles, is not cancelable, and has no default action, that also meets the following conditions: | ||
## If the implementation is unable to report the current device light, | ## If the implementation is unable to report the current device light, it must stop the service, otherwise initialize the attribute to the '''''current device magnetic field'''''. | ||
# Queue a task to dispatch the newly created event at the Window object. | # Queue a task to dispatch the newly created event at the Window object. | ||
| Line 100: | Line 100: | ||
NOTE | NOTE | ||
:The definition of granularity i.e. how often the event is fired is left to the implementation. Implementations may fire the event if they have reason to believe that the page does not have sufficiently fresh data. | :The definition of granularity i.e. how often the event is fired is left to the implementation. Implementations may fire the event if they have reason to believe that the page does not have sufficiently fresh data. | ||
==== Event handlers ==== | ==== Event handlers ==== | ||