W3C home > Mailing lists > Public > public-dap-commits@w3.org > November 2012

dap commit: Fix an HTML issue.

From: Mercurial notifier <cvsmail@w3.org>
Date: Mon, 05 Nov 2012 21:53:45 +0000
Message-Id: <E1TVUc5-000793-VW@mcbain.w3.org>
To: public-dap-commits@w3.org
changeset:   270:5af8a0637294
user:        Mounir Lamouri <mounir.lamouri@gmail.com>
date:        Mon Nov 05 16:43:41 2012 +0000
files:       network-api/Overview.html
description:
Fix an HTML issue.


diff -r 20ab51fe20f3 -r 5af8a0637294 network-api/Overview.html
--- a/network-api/Overview.html	Mon Nov 05 16:39:27 2012 +0000
+++ b/network-api/Overview.html	Mon Nov 05 16:43:41 2012 +0000
@@ -238,60 +238,56 @@
       <p>
         This trivial example writes the connection bandwidth to the console and shows it again each time it is changing:
       </p>
-      <div class="example">
-        <pre class="example highlight">
-          function show() {
-            console.log(navigator.connection.bandwidth);
-          }
+      <pre class="example highlight">
+        function show() {
+          console.log(navigator.connection.bandwidth);
+        }
 
-          navigator.connection.addEventListener('change', show, false);
+        navigator.connection.addEventListener('change', show, false);
 
-          show();
-        </pre>
-      </div>
+        show();
+      </pre>
 
       <p>
         This example shows how an application can prevent automatic polling using the metered attribute:
       </p>
-      <div class="example">
-        <pre class="example highlight">
-          &lt;!DOCTYPE html&gt;
-          &lt;html&gt;
-            &lt;head&gt;
-              &lt;title&gt;Conditional polling&lt;/title&gt;
-              &lt;script&gt;
-                var gPreviousMetered = navigator.connection.metered;
-                var gIntervalId;
+      <pre class="example highlight">
+        &lt;!DOCTYPE html&gt;
+        &lt;html&gt;
+          &lt;head&gt;
+            &lt;title&gt;Conditional polling&lt;/title&gt;
+            &lt;script&gt;
+              var gPreviousMetered = navigator.connection.metered;
+              var gIntervalId;
 
-                function poll() {
-                  // poll stuff
+              function poll() {
+                // poll stuff
+              }
+
+              navigator.connection.addEventListener('change', function() {
+                if (gPreviousMetered == navigator.connection.metered) {
+                  return;
                 }
 
-                navigator.connection.addEventListener('change', function() {
-                  if (gPreviousMetered == navigator.connection.metered) {
-                    return;
-                  }
+                gPreviousMetered = navigator.connection.metered;
+                if (navigator.connection.metered) {
+                  gIntervalId = setInterval(poll, 1000);
+                } else {
+                  clearInterval(gIntervalId);
+                }
+              }, false);
 
-                  gPreviousMetered = navigator.connection.metered;
-                  if (navigator.connection.metered) {
-                    gIntervalId = setInterval(poll, 1000);
-                  } else {
-                    clearInterval(gIntervalId);
-                  }
-                }, false);
-
-                // At load time.
-                if (!navigator.connection.metered) {
-                  gIntervalId = setInterval(poll, 1000);
-                }
-              &lt;/script&gt;
-            &lt;/head&gt;
-            &lt;body&gt;
-              &lt;button onclick="poll();"&gt;Poll&lt;/button&gt;
-            &lt;/body&gt;
-          &lt;/html&gt;
-        </pre>
-      </div>
+              // At load time.
+              if (!navigator.connection.metered) {
+                gIntervalId = setInterval(poll, 1000);
+              }
+            &lt;/script&gt;
+          &lt;/head&gt;
+          &lt;body&gt;
+            &lt;button onclick="poll();"&gt;Poll&lt;/button&gt;
+          &lt;/body&gt;
+        &lt;/html&gt;
+      </pre>
     </section>
 
     <section class='appendix'>
Received on Monday, 5 November 2012 21:53:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 5 November 2012 21:53:47 GMT