html5/spec Overview.html,1.4373,1.4374

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv23200

Modified Files:
	Overview.html 
Log Message:
Explain ononline and onoffline in the author parts. (whatwg r5482)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.4373
retrieving revision 1.4374
diff -u -d -r1.4373 -r1.4374
--- Overview.html	25 Sep 2010 01:12:18 -0000	1.4373
+++ Overview.html	25 Sep 2010 01:50:06 -0000	1.4374
@@ -46755,6 +46755,9 @@
     (disconnected from the network). Returns true if the user agent
     might be online.</p>
 
+    <p>The events <code title="event-online"><a href="#event-online">online</a></code> and <code title="event-offline"><a href="#event-offline">offline</a></code> are fired when the value of
+    this attribute changes.</p>
+
    </dd>
 
   </dl><div class="impl">
@@ -46782,7 +46785,27 @@
   source</a>.</p>
 
   </div><p class="note">This attribute is inherently unreliable. A computer
-  can be connected to a network without having Internet access.<h2 id="webappapis"><span class="secno">6 </span>Web application APIs</h2><h3 id="scripting"><span class="secno">6.1 </span>Scripting</h3><h4 id="introduction-4"><span class="secno">6.1.1 </span>Introduction</h4><p>Various mechanisms can cause author-provided executable code to
+  can be connected to a network without having Internet access.<div class="example">
+
+   <p>In this example, an indicator is updated as the browser goes
+   online and offline.</p>
+
+   <pre>&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+ &lt;head&gt;
+  &lt;title&gt;Online status&lt;/title&gt;
+  &lt;script&gt;
+   function updateIndicator() {
+     document.getElementById('indicator').textContext = navigator.onLine ? 'online' : 'offline';
+   }
+  &lt;/script&gt;
+ &lt;/head&gt;
+ &lt;body onload="updateIndicator()" ononline="updateIndicator()" onoffline="updateIndicator()"&gt;
+  &lt;p&gt;The network is: &lt;span id="indicator"&gt;(state unknown)&lt;/span&gt;
+ &lt;/body&gt;
+&lt;/html&gt;</pre>
+
+  </div><h2 id="webappapis"><span class="secno">6 </span>Web application APIs</h2><h3 id="scripting"><span class="secno">6.1 </span>Scripting</h3><h4 id="introduction-4"><span class="secno">6.1.1 </span>Introduction</h4><p>Various mechanisms can cause author-provided executable code to
   run in the context of a document. These mechanisms include, but are
   probably not limited to:<ul><li>Processing of <code><a href="#script">script</a></code> elements.</li>
 

Received on Saturday, 25 September 2010 01:50:12 UTC