window.confirm() replacement for XPCOM
This commit is contained in:
parent
38d87463af
commit
d323df4a2d
1 changed files with 8 additions and 0 deletions
|
@ -58,6 +58,14 @@ function alert(msg){
|
||||||
.alert(null, "", msg);
|
.alert(null, "", msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convenience method to replicate window.confirm()
|
||||||
|
**/
|
||||||
|
function confirm(msg){
|
||||||
|
return Cc["@mozilla.org/embedcomp/prompt-service;1"]
|
||||||
|
.getService(Ci.nsIPromptService)
|
||||||
|
.confirm(null, "", msg);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// XPCOM goop
|
// XPCOM goop
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue