How can I check whether an extension(BHO) is installed in IE 6/7/8?
How can I check whether开发者_StackOverflow社区 an extension(BHO) is installed in IE 6/7/8, with javascript code in a webpage?
You need to include an ActiveX control in your extension.
- This should be a separate COM object from your BHO.
- Make sure to SiteLock the control to your domain.
Then, on your website, you can just try to create that control:
var foo;
try {
foo = new ActiveXObject("your.control");
} catch (e) {
foo = null;
}
if (foo == null) {
// Your package not installed.
}
精彩评论