Here's my question: I want to see from javascript if an object is being clicked at the moment, Here is an example:
setInterval(function() {
if (document.getElementByTagName('button')[0].isBeingClicked) { //I know this isn't right: This is where my question is about.
console.log('Button being clicked');
return;
};
console.log('Button not being clicked');
}, 1000);
With as simplified HTML ofcourse:
<html>
<head></head>
<body>
<button>Click me</button>
</body>
</html>
So all together: I want to be able to see whether a button or another object is being clicked at this time. Not if it has been clicked, but is being clicked.