I've got the following code:
function myfunc(e){
console.log(e.target);
}
which returns the event of the clicked target. But I want to trigger that same function without clicking on a target.
Is this possible? is it possible to do something like this?
myfunc(document.getElementById('btn').target);