AddEventListener: onmousedown
18,600
It is mousedown
not onmousedown
.
object.addEventListener("mousedown", myScript);
ref: http://www.w3schools.com/jsref/event_onmousedown.asp
Author by
Ryan Hawdon
Updated on June 23, 2022Comments
-
Ryan Hawdon almost 2 years
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() { });