summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/docs/notifications.html
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common/extensions/docs/notifications.html')
-rw-r--r--chrome/common/extensions/docs/notifications.html99
1 files changed, 64 insertions, 35 deletions
diff --git a/chrome/common/extensions/docs/notifications.html b/chrome/common/extensions/docs/notifications.html
index 415fab9..644a13d 100644
--- a/chrome/common/extensions/docs/notifications.html
+++ b/chrome/common/extensions/docs/notifications.html
@@ -211,18 +211,39 @@
<h1 class="page_title">Desktop Notifications</h1>
</div>
<!-- TABLE OF CONTENTS -->
- <div id="toc" style="display: none; ">
+ <div id="toc">
<h2>Contents</h2>
<ol>
<li>
- <a>h2Name</a>
+ <a href="#manifest">Manifest</a>
<ol>
- <li>
+ <li style="display: none; ">
+ <a>h3Name</a>
+ </li>
+ </ol>
+ </li><li>
+ <a href="#communication">Communicating with other views</a>
+ <ol>
+ <li style="display: none; ">
+ <a>h3Name</a>
+ </li>
+ </ol>
+ </li><li>
+ <a href="#examples"> Examples </a>
+ <ol>
+ <li style="display: none; ">
+ <a>h3Name</a>
+ </li>
+ </ol>
+ </li><li>
+ <a href="#api">API</a>
+ <ol>
+ <li style="display: none; ">
<a>h3Name</a>
</li>
</ol>
</li>
- <li>
+ <li style="display: none; ">
<a href="#apiReference">API reference</a>
<ol>
<li>
@@ -265,6 +286,7 @@
<!-- STATIC CONTENT PLACEHOLDER -->
<div id="static"><div id="pageData-name" class="pageData">Desktop Notifications</div>
+<div id="pageData-showTOC" class="pageData">true</div>
<!-- BEGIN AUTHORED CONTENT -->
<p>
@@ -312,37 +334,6 @@ There is no need to call
<code>webkitNotifications.checkPermission()</code>.
</p>
-<h2 id="api">API</h2>
-
-<p>
-The desktop notification API for extensions
-is the same one that
-is available to normal web pages.
-As the following code shows,
-you first create either a simple text notification
-or an HTML notification,
-and then you show the notification.
-</p>
-
-<pre>// Create a simple text notification:
-var notification = webkitNotifications.createNotification(
- '48.png', // icon url - can be relative
- 'Hello!', // notification title
- 'Lorem ipsum...' // notification body text
-);
-
-// Or create an HTML notification:
-var notification = webkitNotifications.createHTMLNotification(
- 'notification.html' // html url - can be relative
-);
-
-// Then show the notification.
-notification.show();
-</pre>
-
-<p>For complete API details,
-see the <a href="http://dev.chromium.org/developers/design-documents/desktop-notifications/api-specification">Desktop notifications draft specification</a>.</p>
-
<h2 id="communication">Communicating with other views</h2>
<p>
@@ -374,6 +365,44 @@ and for help in viewing the source code,
see <a href="samples.html">Samples</a>.
</p>
+<p>
+Also see html5rocks.com's
+<a href="http://www.html5rocks.com/tutorials/notifications/quick/">notifications tutorial</a>.
+Ignore the permission-related code;
+it's unnecessary if you declare the "notifications" permission.
+</p>
+
+<h2 id="api">API</h2>
+
+<p>
+The desktop notification API for extensions
+is the same one that
+is available to normal web pages.
+As the following code shows,
+you first create either a simple text notification
+or an HTML notification,
+and then you show the notification.
+</p>
+
+<pre>// Create a simple text notification:
+var notification = webkitNotifications.createNotification(
+ '48.png', // icon url - can be relative
+ 'Hello!', // notification title
+ 'Lorem ipsum...' // notification body text
+);
+
+// Or create an HTML notification:
+var notification = webkitNotifications.createHTMLNotification(
+ 'notification.html' // html url - can be relative
+);
+
+// Then show the notification.
+notification.show();
+</pre>
+
+<p>For complete API details,
+see the <a href="http://dev.chromium.org/developers/design-documents/desktop-notifications/api-specification">Desktop notifications draft specification</a>.</p>
+
<!-- END AUTHORED CONTENT -->
</div>