var triggerMe = false document.onmousedown = function(e){ var yeah = new MouseEvent('mousedown',e) console.log(t) if(!triggerMe) { triggerMe = true; document.dispatchEvent(yeah) } };