JS - trigger mousedown event

0 votes
1,055 views
added Aug 6, 2019 in Javascript by anonymous
var triggerMe = false
document.onmousedown = function(e){
  var yeah = new MouseEvent('mousedown',e)
  console.log(t)
  if(!triggerMe)
  {
    triggerMe = true;
    document.dispatchEvent(yeah)
  }
};

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...