简体   繁体   English

如何在无需实例化ActiveXObject的情况下在IE 8/9/10中检测ActiveX控件

[英]How to detect ActiveX controls in IE 8/9/10 without having to instantiate ActiveXObject

Is it possible to detect which ActiveX controls are active in IE 8/9/10 using JavaScript (or some other technology - possibly Java?), in a way that is more extensible and dynamic than attempting to instantiate a specific ActiveX object around a try-catch block? 是否有可能使用JavaScript(或某些其他技术,可能是Java)检测IE 8/9/10中哪些ActiveX控件处于活动状态,而这种方式比尝试在try-catch周围实例化特定ActiveX对象时更具扩展性和动态性。 try-catch块? So far, this appears to be the only way to achieve this solution, but this solution is not extensible and would require much additional code maintenance when newer ActiveX plugins are released. 到目前为止,这似乎是实现此解决方案的唯一方法,但此解决方案不可扩展,并且在发布较新的ActiveX插件时将需要大量额外的代码维护。

It would be nice to be able to detect plugins similar in a way that JS does with the navigator.plugins array, but as far as I can tell, there is no comparable way to do this for ActiveX controls. 能够以JS对navigator.plugins数组的方式检测类似的插件将是很好的,但是据我所知,对于ActiveX控件没有类似的方法。

You could probably create an activex control that had the ability to detect the presence of other activex controls, but IE does not expose any API to do this for you. 您可能会创建一个能够检测其他Activex控件是否存在的Activex控件,但是IE不会公开任何API来为您执行此操作。

Catch-22. 赶上22。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM