سؤال

My organization has a tech form that captures browser version info about SWF, PDF, MP4, etc.

Up to now, branching for Explorer vs everyone else was simple: a script loaded from a conditional comment runs ActiveX tests, while other browsers check navigator.plugins[] and navigator.mimeTypes[].

Unfortunately, IE10 ignores conditional comments, but it doesn't support the navigator arrays either. Do I need to put all the ActiveX stuff in the main script? And if so, what is the if() statement to control it?

هل كانت مفيدة؟

المحلول

As the commenters said, testing for window.ActiveXObject returns true on IE 10 and below. But note that Microsoft is abandoning ActiveX in their new Microsoft Edge (formerly Project Spartan) browser.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top