mirror of
https://github.com/zotero/zotero.git
synced 2026-09-11 22:51:15 +00:00
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue