4 Apr 2011 08:47
How to add listener for DomContentLoaded and Load event
raghavan.s <raghavans <at> gmail.com>
2011-04-04 06:47:51 GMT
2011-04-04 06:47:51 GMT
Hi,
I posted this question in mozilla.dev.embedding and got no response.
Trying my luck here,
I am embedding xulrunner in a java application. The application will
launch new window with some URL to measure performance
metrics like DNS time, Connection time, Time to First byte , Time to
last byte, Start render time and document complete.
I used following code to launch the window:
nsIThread thread = threadMgr.getMainThread();
windowWatcher =
(nsIWindowWatcher)serviceManager.getServiceByContractID(" <at> mozilla.org/
embedcomp/window-watcher;1",nsIWindowWatcher.NS_IWINDOWWATCHER_IID);
nsIWindowWatcher watcherProxy =
(nsIWindowWatcher)proxy.getProxyForObject(thread,nsIWindowWatcher.NS_IWINDOWWATCHER_IID,windowWatcher,nsIProxyObjectManager.INVOKE_SYNC);
nsIDOMWindow window=watcherProxy.openWindow(null,
"about:blank","window1",
"chrome,centerscreen,resizable,width=1024,height=768", null);
nsIInterfaceRequestor ir = (nsIInterfaceRequestor)
window.queryInterface(nsIInterfaceRequestor.NS_IINTERFACEREQUESTOR_IID);
nsIWebNavigation webNav
=(nsIWebNavigation)ir.getInterface(nsIWebNavigation.NS_IWEBNAVIGATION_IID);
(Continue reading)
RSS Feed