nsIPrompt 编辑
netwerk/base/public/nsIPrompt.idl
Scriptable 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. Inherits from: nsISupports
Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Note: This interface is identical to nsIPromptService
but without the parent nsIDOMWindow
parameter. To avoid redundancy, all methods here link to nsIPromptService
. If you are using this interface, you must remove the nsIDOMWindow
arguments from those methods.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()
.
Method overview
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); |
Constants
The button flags defined in nsIPrompt
are the same as those defined in nsIPromptService.Constants
. Example usage is also documented: Using the button Flags
See Also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论