I've been working on a BHO/toolbar written in C# that listens to HTML events raised on the browser's current webpage. The solution includes a reusable class called HtmlPageEventManager whose purpose is to subscribe to a given list of HTML events for each new webpage that's opened. A goal is to attach handlers as soon as the user can begin interacting with page elements, even before the page load is complete. Using this class is simple -- just call the constructor:
var evts = new List() { HtmlEvent.onclick, HtmlEvent.ondblclick, HtmlEvent.onkeydown, HtmlEvent.onselectstart, HtmlEvent.onselectionchange, HtmlEvent.onfocus, HtmlEvent.onselect }; new HtmlPageEventManager( this, evts, this.HtmlEventHandler );
Please download my solution here to try it out and send me feedback. Feel free to use it in your own projects if you find it useful. Although it works well, there are occasions when it fails to attach the events. I've had difficulty pinpointing those circumstances. So I could use some help improving upon HtmlPageEventManager.
My solution references SpicIE's assemblies but they're not included in the above download, so you will need to get it from the SpicIE website . Btw, this is probably a good time to ask: how popular is SpicIE? Any better tool to use?