Skip to content

Instantly share code, notes, and snippets.

@rpl
Created December 14, 2009 23:39
Show Gist options
  • Save rpl/256554 to your computer and use it in GitHub Desktop.
Save rpl/256554 to your computer and use it in GitHub Desktop.
var notifyBox = window.getNotificationBox(content);
notifyBox.appendNotification( "XULit say: NotificationBox is cool, isn't it?",
"notify-01",
"chrome://xulnotificationbox/content/xulit.ico",
notifyBox.PRIORITY_INFO_LOW, null);
notifyBox.appendNotification(
"XULit say: NotificationBox is cool, isn't it?",
"notify-02", "chrome://xulnotificationbox/content/xulit.ico",
notifyBox.PRIORITY_WARNING_MEDIUM, [
{ accessKey: "O", label: "Ok",
callback: function(msg, btn) { alert("OK"); } },
{ accessKey: "K", label: "KO", popup: null,
callback: function(msg, btn) { alert("KO"); } },
]);
var msg = notifyBox.appendNotification(
"XULit say: NotificationBox is cool, isn't it?",
"notify-03", "chrome://xulnotificationbox/content/xulit.ico",
notifyBox.PRIORITY_CRITICAL_BLOCK, null);
msg.addEventListener("DOMNodeRemoved", function(e) { alert("Closed"); }, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment