Is it possible to simulate a click on a webpage using javascript but without defining a specific element, but rather just specifying the document?
I would have liked to do something like this, and if the location happens to have a link, then this will be pressed:
function simulateClick(x, y)
{
var evt = window.createEvent("MouseEvents");
evt.initMouseEvent("click", true, true, window,
x, y, x, y, 1, false, false, false, false, 0, null);
window.dispatchEvent(evt);
}