I am trying to find a way to detect changes on a page from BHO. For the Firefox version of the plugin, I use DomNodeInserted , but this is not available in IE. I also looked at using onpropertychange , but this allows you to control only one element (and not children).
Now I am wondering if it is possible to track when AJAX requests are called. If so, I can make changes to the page after completing the AJAX request. The only problem is that I cannot find a way to do this.
Here, my attempt so far, based on jeffamaphone suggestions, does not work, but perhaps it will eclipse someone's memory.
public class ChangeMonitor : IHTMLChangeSink { public void Notify() { Trace.WriteLine("notified"); } } void registerMonitor() { HTMLDocument document = _webBrowser2.Document; ChangeMonitor monitor = new ChangeMonitor(); IHTMLChangeSink changeSink = monitor; IHTMLChangeLog changeLog = null; ((IMarkupContainer2)document).CreateChangeLog(changeSink, out changeLog, 1, 1); }
source share