Reputation: 389
I am creating a Chrome Extension which checks to see if there is "onmousedown" attribute and if so I will execute some code.
I have tried this however it isn't working.
document.addEventListener("onmousedown", function() {
});
Upvotes: 6
Views: 29899
Reputation:
It is mousedown
not onmousedown
.
object.addEventListener("mousedown", myScript);
ref: http://www.w3schools.com/jsref/event_onmousedown.asp
Upvotes: 19