This is the prompt interface which can be used without knowledge of a parent window. The parentage is hidden by the
GetInterface
though which it is obtained.
继承于:
nsISupports
最后修改于Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0)
注: 本接口基本等价于
nsIPromptService
,只是没有parent nsIDOMWindow
这个参数.为了避免重复的文档,下面的所有方法都链接到了nsIPromptService
.如果你准备使用这个接口,一定要删除那些方法中的nsIDOMWindow
参数.Normally you would use the prompt service as it is more flexible, but sometimes a callback will request an nsIPrompt
via nsIInterfaceRequestor.getInterface()
. To get an instance, call the nsIWindowWatcher.getNewPrompter()
.
方法概述
void alert(in wstring dialogTitle, in wstring text); |
void alertCheck(in wstring dialogTitle, in wstring text, in wstring checkMsg, inout boolean checkValue); |
boolean confirm(in wstring dialogTitle, in wstring text); |
boolean confirmCheck(in wstring dialogTitle, in wstring text, in wstring checkMsg, inout boolean checkValue); |
PRInt32 confirmEx(in wstring dialogTitle, in wstring text, in unsigned long buttonFlags, in wstring button0Title, in wstring button1Title, in wstring button2Title, in wstring checkMsg, inout boolean checkValue); |
boolean prompt(in wstring dialogTitle, in wstring text, inout wstring value, in wstring checkMsg, inout boolean checkValue); |
boolean promptPassword(in wstring dialogTitle, in wstring text, inout wstring password, in wstring checkMsg, inout boolean checkValue); |
boolean promptUsernameAndPassword(in wstring dialogTitle, in wstring text, inout wstring username, inout wstring password, in wstring checkMsg, inout boolean checkValue); |
boolean select(in wstring dialogTitle, in wstring text, in PRUint32 count, [array, size_is(count)] in wstring selectList, out long outSelection); |
常量
nsIPrompt中的
按钮标识同样等同于nsIPromptService.Constants
中定义的那些.示例代码可以在这里找到: 使用按钮标识