我们的志愿者还没有将这篇文章翻译为 中文 (简体)。加入我们帮助完成翻译！
@mozilla.org/process/util;1. To create an instance, use:
var process2 = Components.classes["@mozilla.org/process/util;1"] .createInstance(Components.interfaces.nsIProcess2);
Asynchronously runs the process with which the object was initialized, optionally calling an observer when the process finishes running.
void runAsync( [array, size_is(count)] in string args, in unsigned long count, in nsIObserver observer, Optional in boolean holdWeak Optional );
An array of arguments to pass into the process, using the native character set. This array must have
The number of arguments passed in the
An observer that will be notified when the process exits. The observer will receive this
nsIProcess2instance as the subject and "process-finished" or "process-failed" as the topic. The observer will be notified on the main thread.
true, a weak reference is used to hold the observer.