nsICommandLineRunner 编辑
The nsICommandLineRunner is an extension of nsICommandLine
used to initialize command lines and run them by processing the comand line handlers.
toolkit/components/commandlines/public/nsICommandLineRunner.idl
Scriptable Please add a summary to this article. Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0)Inherits from: nsICommandLine
Method overview
void init(in long argc, in nsCharPtrArray argv, in nsIFile workingDir, in unsigned long state); |
void run(); |
void setWindowContext(in nsIDOMWindow aWindow); |
Attributes
Attribute | Type | Description |
helpText | AUTF8String | Process and combine the help text provided by each command-line handler. Read only. |
Methods
init()
Called with the argc/argv combination passed to main. It assumes a native character set. On Windows the character set is UTF-8, not the native codepage.
void init( in long argc, in nsCharPtrArray argv, in nsIFile workingDir, in unsigned long state );
Parameters
argc
- The number of arguments being passed.
argv
- An array storing pointers to the arguments
workingDir
- Directory where the command will run. This is used to resolve file and URI paths.
state
- The type of command line being processed. This is an
nsICommandLine
state flag.
run()
Processes the command-line handlers in the proper order, and calls nsICommandLineHandler.handle()
on each.
void run();
Parameters
None.
Exceptions thrown
NS_ERROR_ABORT
- Thrown when the handler aborts. All other errors thrown by handlers will be silently ignored.
setWindowContext()
Sets the windowContext parameter.
void setWindowContext( in nsIDOMWindow aWindow );
Parameters
aWindow
- The DOM window object which will be set. It is an
nsIDOMWindow
object.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论