dap commit: unofficial draft

changeset:   151:326d1382f1d5
tag:         tip
user:        Marcos Caceres <w3c@marcosc.com>
date:        Fri Jul 13 07:58:51 2012 +0100
files:       humidity/Overview.html
description:
unofficial draft


diff -r 6cc5c1c17b36 -r 326d1382f1d5 humidity/Overview.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/humidity/Overview.html	Fri Jul 13 07:58:51 2012 +0100
@@ -0,0 +1,190 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Ambient Humidity 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:            "humidity",
+          //publishDate:          "yyyy-mm-dd",
+          //previousPublishDate:  "yyyy-mm-dd",
+          previousMaturity:     "ED",
+          edDraftURI:           "http://dvcs.w3.org/hg/dap/raw-file/tip/humidity/Overview.html",
+          //lcEnd:                "yyyy-mm-dd",
+          editors:  [
+			  { name: "Marcos Cáceres", company: "W3C Invited Expert", companyURL: "http://datadriven.com.au" },
+			  { name: "Balaji N.V", company: "Samsung Electronics", companyURL: "http://samsung.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 
+      ambient humidity.
+    </section>
+    
+    <section id="sotd">
+     
+    </section>
+    
+    <section class="informative">
+      <h2>Introduction</h2>
+      <p>
+        The <a>AmbientHumidityEvent</a> interface provides web developers
+        information about the ambient humidity levels near the hosting device.
+      </p>
+      <p>
+        This is achieved by interrogating a humidistat or similar detectors
+        of a device.
+      </p>
+    </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 humidity</dfn> is a value that represents the ralative humidity expressed as a value between 0 and 1 (e.g., 0.533, which equates to 53.3% humidity).
+      </p>
+    </section>
+    
+    <section>
+      <h2>Security and privacy considerations</h2>
+      <p>
+      </p>
+    </section>
+    
+    <section>
+      <h2>Humidity</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 onambienttemp</dt>
+        <dd>
+        </dd>
+      </dl>
+      <p>
+        The <code>onambienttemp</code> event handler and its corresponding
+        event handler event type <code>ambienthumidity</code> MUST be supported
+        as an IDL attribute by all objects implementing the <a>Window</a>
+        interface.
+      </p>
+      <section>
+        <h2><a>AmbientHumidityEvent</a> Interface</h2>
+        <dl title="[Constructor (DOMString type, optional AmbientHumidityEventInit eventInitDict)]
+                   interface AmbientHumidityEvent : Event"
+            class="idl" data-merge='AmbientHumidityEventInit'>
+          <dt>readonly attribute double value</dt>
+          <dd>
+            The <a>current ambient humidity</a>.
+          </dd>
+        </dl>
+        <dl title="dictionary AmbientTempEventInit : EventInit" class='idl'>
+          <dt>
+            double value
+          </dt>
+          <dd></dd>
+        </dl>
+        <p>
+          When a <dfn>user agent</dfn> is required to <dfn>fire an ambient humidity 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>AmbientHumidityEvent</a>
+            interface, with the name <code>ambienthumidity</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
+                ambient humidity</a>, initialize the <code>value</code>
+                attribute to positive Infinity, otherwise initialize the
+                attribute to the <a>current ambient humidity</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 humidity</a> changes, the <a>user
+          agent</a> MUST <a>fire a ambient humidity 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>onambienttemp</code></strong></td>
+                <td><code>ambienthumidity</code></td>
+              </tr>
+            </tbody>
+          </table>
+        </section>
+      </section>
+    </section>
+      
+    <section class="appendix"></section>
+</body>
+</html>

Received on Friday, 13 July 2012 06:59:19 UTC