| OLD | NEW |
| 1 <h1>Desktop Notifications</h1> | 1 <h1>Desktop Notifications</h1> |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 <p> | 5 <p> |
| 6 Use desktop notifications to notify users that something | 6 Use desktop notifications to notify users that something |
| 7 important has happened. | 7 important has happened. |
| 8 Notifications appear outside the browser window. | 8 Notifications appear outside the browser window. |
| 9 As the following snapshots show, | 9 As the following snapshots show, |
| 10 the details of how notifications look | 10 the details of how notifications look |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 // Or create an HTML notification: | 65 // Or create an HTML notification: |
| 66 var notification = webkitNotifications.createHTMLNotification( | 66 var notification = webkitNotifications.createHTMLNotification( |
| 67 'notification.html' // html url - can be relative | 67 'notification.html' // html url - can be relative |
| 68 ); | 68 ); |
| 69 | 69 |
| 70 // Then show the notification. | 70 // Then show the notification. |
| 71 notification.show(); | 71 notification.show(); |
| 72 </pre> | 72 </pre> |
| 73 | 73 |
| 74 <h2>API Reference</h2> | 74 <h2 id="reference">API Reference</h2> |
| 75 | 75 |
| 76 <p>See the <a href="http://dev.chromium.org/developers/design-documents/desktop-
notifications/api-specification">Desktop Notifications Draft Specification</a>.<
/p> | 76 <p>See the <a href="http://dev.chromium.org/developers/design-documents/desktop-
notifications/api-specification">Desktop Notifications Draft Specification</a>.<
/p> |
| 77 | 77 |
| 78 | 78 |
| 79 <h2 id="communication">Communicating with Other Views</h2> | 79 <h2 id="communication">Communicating with Other Views</h2> |
| 80 | 80 |
| 81 <p> | 81 <p> |
| 82 You can communicate between a notification | 82 You can communicate between a notification |
| 83 and other views in your extension using | 83 and other views in your extension using |
| 84 <a href="extension.html#method-getBackgroundPage">getBackgroundPage()</a> and | 84 <a href="extension.html#method-getBackgroundPage">getBackgroundPage()</a> and |
| (...skipping 22 matching lines...) Expand all Loading... |
| 107 and for help in viewing the source code, | 107 and for help in viewing the source code, |
| 108 see <a href="samples.html">Samples</a>. | 108 see <a href="samples.html">Samples</a>. |
| 109 </p> | 109 </p> |
| 110 | 110 |
| 111 <p> | 111 <p> |
| 112 Also see html5rocks.com's | 112 Also see html5rocks.com's |
| 113 <a href="http://www.html5rocks.com/tutorials/notifications/quick/">notifications
tutorial</a>. | 113 <a href="http://www.html5rocks.com/tutorials/notifications/quick/">notifications
tutorial</a>. |
| 114 Ignore the permission-related code; | 114 Ignore the permission-related code; |
| 115 it's unnecessary if you declare the "notifications" permission. | 115 it's unnecessary if you declare the "notifications" permission. |
| 116 </p> | 116 </p> |
| OLD | NEW |