This specification defines the common interface from which all device APIs are can be accessed as well as several interfaces that are commonly reused.

This specification defines a single conformance class: that which comprises user agents that support these interfaces.

The Device interface

The Device interface is initially defined as an empty interface on which the various device APIs that are defined elsewhere graft themselves. A user agent supporting the Device interface MUST do so according to the following WebIDL [[!WEBIDL]] definition.

The NavigatorDevice interface

The NavigatorDevice interface supplements the Navigator interface which is defined as part of HTML 5 [[!NAVIGATOR]]. A user agent MUST expose a device attribute that implements the Device interface on the navigator object.

readonly attribute Device device
Returns the Device object which provides access to all the device APIs that the user agent exposes.

Integration with the navigator object

The PendingOp interface

The PendingOp interface describes objects that are returned by asynchronous methods that are cancellable. It makes it possible to bring these operations to a stop if they haven't produced a result within a desired time or before a given event, thereby possibly reclaiming resources.

void cancel ()
Cancel the pending asynchronous operation. When this method is called, the user agent MUST immediately bring the operation to a stop and return.

Acknowledgements

The editors would like to thank (in not particular order): Anne van Kesteren, Brian LeRoux, Claes Nilsson, and Peter-Paul Koch.