This is a similar question to this post, although that question doesn't have a marked answer and isn't very specific.
I am simulating a click using a mouseEvent
:
element.dispatchEvent(new MouseEvent("click", {...}));
and I have a listener:
element.addEventListener("click", function() {
console.log(event);
});
Is is possible for me to simulate/spoof isTrusted=true
to that listener?