Compare Revisions

nsIAlertsService

Change Revisions

Revision 303159:

Revision 303159 by Wladimir_Palant on

Revision 421403:

Revision 421403 by MKaply on

Title:
nsIAlertsService
nsIAlertsService
Slug:
XPCOM_Interface_Reference/nsIAlertsService
XPCOM_Interface_Reference/nsIAlertsService
Tags:
"XPCOM Interface Reference", "Interfaces:Scriptable", "XPCOM", "Interfaces", "XPCOM API Reference"
"XPCOM Interface Reference", "Interfaces:Scriptable", "XPCOM", "Interfaces", "XPCOM API Reference"
Content:

Revision 303159
Revision 421403
nn43    </p>
44    <p>
45      {{ NoteStart() }}If you are calling this function from Java
 >Script, you should wrap it in a try/catch because it can fail on 
 >Mac OS X.{{ NoteEnd() }}
nn139try {
136alertsService.showAlertNotification("<a class="external" href="ch140  alertsService.showAlertNotification("<a class="external" href="
>rome://mozapps/skin/downloads/downloadIcon.png" rel="freelink">ch>chrome://mozapps/skin/downloads/downloadIcon.png" rel="freelink">
>rome://mozapps/skin/downloads/downloadIcon.png</a>", >chrome://mozapps/skin/downloads/downloadIcon.png</a>", 
137                                    "Alert title", "Alert text go141                                      "Alert title", "Alert text 
>es here.", >goes here.", 
138                                    false, "", null, "");142                                      false, "", null, "");
143} catch (e) {
144  // This can fail on Mac OS X
145}
tt161try {
154alertsService.showAlertNotification("",  "Alerts service test", "162  alertsService.showAlertNotification("",  "Alerts service test",
>Click me", > "Click me", 
155                                    true, "cookie", listener, "")163                                      true, "cookie", listener, "
>;>");
164} catch (e) {
165  // This can fail on Mac OS X
166}

Back to History