Charles Henri d'Argent wrote:
>
> I have the same issue as you. I need to call navigator.plugins.refresh(true);
> inside install.js for Netscape 6
> but as Dan Veditz points out; it is a Netscape 6 bug and none of the window
> objects can be accessed.
It's not a bug; there is no window to which such an object could refer. The
inability to refresh plugins from inside a script, however, is an
unimplemented feature.
> If so, does this work ? Also, if it does, how do you use
> InstallTrigger.install() method to specify the .xpi file and the
> callback function ? I can't find any doc on this except the function's
> prototype in the XPInstall APIs list:
> boolean = install(nsXPITriggerInfo *aInfo);
>
> What is nsXPITriggerInfo ? Javascript does not recognize XPITriggerInfo nor
> TriggerInfo as objects ? How do you specify
> the call back function and the .xpi file for the InstallTrigger.install() call
You're looking in the wrong place, that's an internal structure and the
install method on a different object. The syntax for
InstallTrigger.install() is
install( AssociativeArray packages [, function callback] )
The packages array can be formed two ways, statically or dynamically.
Statically this looks like
var pkgs = { "Package Display Name1" : "packageURL"
[, "Package Display Name2" : "packageURL2"] ...
};
dynamically (useful when users can make choices on the page itself) this
looks like:
var pkgs = new Object();
pkgs["Package Display Name1"] = "packageURL"; // repeat as necessary
The optional callback function has a URL and status argument:
function installCallback(string URL, int status) {}
> ? In the alternative case, the startSoftwareUpdate function,
> it is relatively straight forward, I use InstallTrigger.startSoftwareUpdate
> (XPIPath, 0); where XPIPath is the full path name of the xpi file.
The advantages of the install() function over the old startSoftwareUpdate()
form are:
- display names will show up on the dialog
- more than one package can be installed at once
- you can get success or failure status
- the URL can be relative to the launching page (VERY useful!)
-Dan Veditz