ActiveX - Notification on DOM removal RRS feed

  • Question

  • Hello! I have encountered a problem when developing an ActiveX control: when I delete the control from DOM using something to the effect of 


    the control doesn't get notified, so I can't run the cleanup code. The control destructor is only called on page refresh.

    My control is based on `MFC ActiveX Control` template in Visual Studio. What would be the proper way to add this kind of notification?


    Friday, June 15, 2018 8:10 AM

All replies

  • Hi,

    IE11 has ActiveX filtering and Security zones which can affect outcomes for ActiveX controls on web pages. You can find out which IE security zone your dev/test environments map to from the File>Properties menu in IE.

    To debug blocked content, security and xss issues in IE11 first go Tools>Internet Options>Advanced tab, check "Always record developer console messages".

    A common design pattern for ActiveX controls is to use a fallback image element or an onerror event handler to display a warning to the user if the control fails to load because of security restrictions or blocking of out of date activeX controls.

    Which version of VS are you using? IT may be using <object clsid="clsid:...….." codebase=""></object> or the page/site is blocking the activex control or the zone security settings are preventing scripting of the control.



    Sunday, August 19, 2018 8:56 PM