first unofficial draft
authorMarcos Caceres <w3c@marcosc.com>
Fri, 13 Jul 2012 07:30:20 +0100
changeset 148 4eb2d21b8cb3
parent 147 d3d022460d6f
child 149 870ea21a6750
first unofficial draft
light/Overview.html
temperature/Overview.html
--- a/light/Overview.html	Thu Jul 12 23:12:01 2012 -0700
+++ b/light/Overview.html	Fri Jul 13 07:30:20 2012 +0100
@@ -7,7 +7,7 @@
     <!--script src='http://dev.w3.org/2009/dap/ReSpec.js/js/respec.js' class='remove'></script-->
     <script class="remove">
       var respecConfig = {
-          specStatus:           "ED",
+          specStatus:           "unofficial",
           shortName:            "light",
           //publishDate:          "yyyy-mm-dd",
           //previousPublishDate:  "yyyy-mm-dd",
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/temperature/Overview.html	Fri Jul 13 07:30:20 2012 +0100
@@ -0,0 +1,193 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Ambient Temperature 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:           "ED",
+          shortName:            "temperature",
+          //publishDate:          "yyyy-mm-dd",
+          //previousPublishDate:  "yyyy-mm-dd",
+          previousMaturity:     "ED",
+          edDraftURI:           "http://dvcs.w3.org/hg/dap/raw-file/tip/temperature/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 temperature.
+    </section>
+    
+    <section id="sotd">
+     
+    </section>
+    
+    <section class="informative">
+      <h2>Introduction</h2>
+      <p>
+        The <a>AmbientTemperatureEvent</a> interface provides web developers
+        information about the ambient temperature levels near the hosting device.
+      </p>
+      <p>
+        This is achieved by interrogating a thermometer 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 temperature</dfn> is a value that represents the
+        ambient temperature in degrees Celsius.
+      </p>
+    </section>
+    
+    <section>
+      <h2>Security and privacy considerations</h2>
+      <p>
+      </p>
+    </section>
+    
+    <section>
+      <h2>Temperature</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>ambienttemperature</code> MUST be supported
+        as an IDL attribute by all objects implementing the <a>Window</a>
+        interface.
+      </p>
+      <section>
+        <h2><a>AmbientTemperatureEvent</a> Interface</h2>
+        <dl title="[Constructor (DOMString type, optional AmbientTemperatureEventInit eventInitDict)]
+                   interface AmbientTemperatureEvent : Event"
+            class="idl" data-merge='AmbientTemperatureEventInit'>
+          <dt>readonly attribute double value</dt>
+          <dd>
+            The <a>current ambient temperature</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 temperature 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>AmbientTemperatureEvent</a>
+            interface, with the name <code>ambienttemperature</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 temperature</a>, initialize the <code>value</code>
+                attribute to positive Infinity, otherwise initialize the
+                attribute to the <a>current ambient temperature</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 temperature</a> changes, the <a>user
+          agent</a> MUST <a>fire a ambient temperature 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>ambienttemperature</code></td>
+              </tr>
+            </tbody>
+          </table>
+        </section>
+      </section>
+    </section>
+      
+    <section class="appendix">
+      <h2>&nbsp;</h2>
+</section>
+</body>
+</html>