사용자에게 알림을 사용할 수 있습니다. 브라우저 창 밖으로 나타납니다.
Example
manifest.json
{
"name" : "Notifications Test",
"version": "1",
"manifest_version" : 2,
"permissions" : [ // 권한
"notifications"
],
"web_accessible_resources" : [ // 알림창에 뜰 아이콘
"48.png"
],
"background": { "scripts": ["background.js"] }
}
background.js
// Create a simple text notification(텍스트)
var notification = webkitNotifications.createNotification(
'48.png',
'Hello!',
'TEST NOTIFICATIONS'
);
// Or create an HTML notification(HTML)
//var notification = webkitNotifications.createNotification(
// 'notificaation.html'
//);
notification.show();'Chrome Extensions' 카테고리의 다른 글
| [Browser UI]Options Pages (0) | 2013.05.11 |
|---|---|
| [Browser UI]chrome.omnibox (0) | 2013.05.10 |
| [Browser UI]contextMenus (0) | 2013.05.10 |
| [Browser UI]browserAction (0) | 2013.05.09 |
| manifest.json (0) | 2013.05.09 |