Hi, I was just wondering if there is a way to get the HWND of the main document in firefox/mozilla? I've been scouring the internet for this answer, and the methods that people have suggested is using nsIAccessibleDocument's windowHandle attribute (which I don't like since it is tied to an unfrozen interface that can't be used in javascript) and nsIBaseWindow's parentNativeWindow (which is also an unfrozen interface but can be accessed via javascript, but unfortunately it doesn't seem to work).
I don't like the idea of using nsIAccessibleDocument because I have to compile in the header file and my xpcom component will be tied to one version of firefox and if the interface changes later on, it can cause horrible problems. The main reason I need the HWND is to be able to detect "onmouseover" and "onmouseout" events for object/embed tags. I want to be able to determine that I moused over some object like the windows media plugin or flash plugin. Just using the javascript event handler works horribly in firefox (only when I mouse a small 1 pixel tall area on the bottom of the embedded plugin I'm able to receive events every now and then, but mouse events works perfectly fine in IE). Better than getting the HWND, if you know of a way to consistently get mouse events for the whole area of the object/embed tags in firefox, that would be great. ---Paul Cho _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
