Hi everyone,

I want to invoke a click in a proxy (XUL browser). I know how to
dispatch a click element and as long I dispatch clicks inside a XUL
window everything works fine but as soon I want to invoke a click on a
-tag inside a browser-element nothing happens (no error is thrown).

The architecure of the XUL-document looks like this:

My source:

for( var i=0; i links[i].onclick = function(event) {

// returns unique XPath-Expression to clicked node
var nodePath = getXPathForElement
document.getElementById('text').value = nodePath;

// lookup the element in the proxy browser
var nsResolver = proxyBrowserDocument.createNSResolver
var theNode = proxyBrowserDocument.evaluate(nodePath,
proxyBrowserDocument, nsResolver,
var thisNode = theNode.iterateNext();
thisNode.style.backgroundColor = 'red';


return false;

Simulate click:

simulateClick : function (e) {
var clickEvent = e.ownerDocument.createEvent('MouseEvents');
clickEvent.initMouseEvent('click', true, true,
e.ownerDocument.defaultView, 1, 0, 0, 0, 0, false, false, false,
false, 0, null);

//works not
//this works
//document.getElementById('secondLink').dispatchEven t

I tried various windows/documents to create the clickEvent but it
seems more likely that the dispatchEvent doesn't fire (even it returns

Is there a security messure or something that prohibits dispatching
events to a browser? Or is the node referer wrong?

Thanks in advance.