- From: Mercurial notifier <cvsmail@w3.org>
- Date: Thu, 06 Sep 2012 21:21:54 +0000
- To: public-dap-commits@w3.org
changeset: 217:9a487c1666da tag: tip user: dtran@DTRAN-MOBL2.amr.corp.intel.com date: Thu Sep 06 14:20:10 2012 -0700 files: pressure/Overview.html description: Atmospheric pressure sensor api diff -r 5583626294f6 -r 9a487c1666da pressure/Overview.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pressure/Overview.html Thu Sep 06 14:20:10 2012 -0700 @@ -0,0 +1,199 @@ +<!DOCTYPE html> +<html> + <head> + <title>Atmospheric Pressure Events</title> + <meta charset="utf-8"/> + <script src='http://www.w3.org/Tools/respec/respec-w3c-common' class='remove'></script> + <!--script src='http://dev.w3.org/2009/dap/ReSpec.js/js/respec.js' class='remove'></script--> + <script class="remove"> + var respecConfig = { + specStatus: "unofficial", + shortName: "atmpressure", + //publishDate: "yyyy-mm-dd", + //previousPublishDate: "yyyy-mm-dd", + previousMaturity: "ED", + edDraftURI: "http://dvcs.w3.org/hg/dap/raw-file/tip/pressure/Overview.html", + //lcEnd: "yyyy-mm-dd", + editors: [ + { name: "Dzung D Tran", company: "Intel", companyURL: "http://intel.com/" } + ], + inlineCSS: true, + noIDLIn: true, + //extraCSS: ["../ReSpec.js/css/respec.css"], + extraCSS: ["http://dev.w3.org/2009/dap/ReSpec.js/css/respec.css"], + wg: "Device APIs Working Group", + wgURI: "http://www.w3.org/2009/dap/", + wgPublicList: "public-device-apis", + wgPatentURI: "http://www.w3.org/2004/01/pp-impl/43696/status", + }; + </script> + </head> +<body> + <section id="abstract"> + This specification defines a means to receive events that correspond to changes in + atmospheric pressure. + </section> + + <section id="sotd"> + + </section> + + <section class="informative"> + <h2>Introduction</h2> + <p> + The <a>AtmPressureEvent</a> interface provides web developers + information about the atmospheric pressure levels measured at the hosting device. + </p> + <p> + This is achieved by interrogating a barometer or similar detectors + of the hosting device. Not all devices contain a barometer, and when + there is no barometer, this API is still exposed to the + scripting environment but it does nothing. + </p> + + <section> + <h3>Use Cases</h3> + <p>Altitude sensing applications which make use of the relationship between changes in pressure relative to the altitude.</p> + <p>Weather prediction applications which make use of barometric pressure to predict weather conditions such as rain is coming.</p> + </section> + + </section> + + <section id="conformance"> + <p> + This specification defines conformance criteria that apply to a single + product: the <dfn>user agent</dfn> that implements the + interfaces that it contains. + </p> + </section> + + <section> + <h2>Terminology</h2> + <p> + The <code><a href="http://dev.w3.org/html5/spec/webappapis.html#eventhandler"> + EventHandler</a></code> interface represents a <a href="http://www.w3.org/TR/WebIDL/#idl-callback-functions">callback function</a> used for <a href="http://dev.w3.org/html5/spec/webappapis.html#event-handlers">event + handlers</a> as defined in [[!HTML5]]. </p> + <p> + The concepts <dfn><a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task"> + queue a task</a></dfn> and + <dfn><a href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event"> + fires a simple event</a></dfn> are defined in [[!HTML5]]. + </p> + <p> + The terms <dfn><a href="http://dev.w3.org/html5/spec/webappapis.html#event-handlers"> + event handlers</a></dfn> and + <dfn><a href="http://dev.w3.org/html5/spec/webappapis.html#event-handler-event-type"> + event handler event types</a></dfn> are defined in [[!HTML5]]. + </p> + <p>The concepts <dfn> + <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#constructing-events"> + create an event</a></dfn> and <dfn> + <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#firing-events"> + fire an event</a></dfn> are defined in [[!DOM4]]. + <p> + The <dfn>current atmospheric pressure</dfn> is a value that represents the + force per unit area exerted onto the hosting device around the pressure sensor by the weight of air above that surface in the atmosphere of Earth in hPA (millibar). + </p> + </section> + + <section> + <h2>Security and privacy considerations</h2> + <p> + </p> + </section> + + <section> + <h2>Atmospheric Pressure</h2> + <p> + The HTML5 specification [[!HTML5]] defines a <a>Window</a> interface, + which this specification extends: + </p> + <dl title="partial interface Window" class="idl"> + <dt>attribute EventHandler onatmpressure</dt> + <dd> + </dd> + </dl> + <p> + The <code>onatmpressure</code> event handler and its corresponding + event handler event type <code>atmpressure</code> MUST be supported + as an IDL attribute by all objects implementing the <a>Window</a> + interface. + </p> + <section> + <h2><a>AtmPressureEvent</a> Interface</h2> + <dl title="[Constructor (DOMString type, optional AtmPressureEventInit eventInitDict)] + interface AtmPressureEvent : Event" + class="idl" data-merge='AtmPressureEventInit'> + <dt>readonly attribute double value</dt> + <dd> + The <a>current atmospheric pressure</a>. + </dd> + </dl> + <dl title="dictionary AtmPressureEventInit : EventInit" class='idl'> + <dt> + double value + </dt> + <dd></dd> + </dl> + <p> + When a <dfn>user agent</dfn> is required to <dfn>fire an atmospheric pressure event</dfn>, the <dfn>user agent</dfn> MUST run the + following steps: + </p> + <ol class="rule"> + <li> + <a>Create an event</a> that uses the <a>AtmPressureEvent</a> + interface, with the name <code>atmpressure</code>, which + bubbles, is not cancelable, and has no default action, that also + meets the following conditions: + <ol> + <li> + If the implementation is unable to report the <a>current + atmospheric pressure</a>, initialize the <code>value</code> + attribute to positive Infinity, otherwise initialize the + attribute to the <a>current atmospheric pressure</a>. + </li> + </ol> + </li> + <li> + <a>Queue a task</a> to dispatch the newly created event at the + <a>Window</a> object. + </li> + </ol> + <p> + When the <a>current atmospheric pressure</a> changes, the <a>user + agent</a> MUST <a>fire a atmospheric pressure event</a>. + </p> + <div class="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. + </div> + <section> + <h2>Event handlers</h2> + <p> + The following are the <a>event handlers</a> (and their corresponding + <a>event handler event types</a>) that MUST be supported as + attributes by the <code>Window</code> object: + </p> + <table class="simple"> + <thead> + <tr> + <th>event handler</th> + <th>event handler event type</th> + </tr> + </thead> + <tbody> + <tr> + <td><strong><code>onatmpressure</code></strong></td> + <td><code>atmpressure</code></td> + </tr> + </tbody> + </table> + </section> + </section> + </section> + + <section class="appendix"></section> +</body> +</html>
Received on Thursday, 6 September 2012 21:21:55 UTC