My goal is to catch pageloads in my component, insert some javascript into the document, and then catch the onFocus events. In the event, I then need to call the javascript function that I inserted.
Now I have managed to solve most of the problems, I have a script added to all web pages and I can catch onfocus events. What they failed to do was execute the javascript function from my XPCOM component (C ++). In my Internet Explorer BHO, I use execScript and it works fine. Any ideas?
My current workaround is to use setattribute and set the onfocus event of each input element to execute the javascript function, but this is intrusive and overwrites existing onFocus handlers on the web page. Other ideas are welcome.
Thanks.
source
share