id.addeventlistener code example
Example 1: addeventlistener hover js
let test = document.getElementById("test");
test.addEventListener("mouseover", function( event ) {
alert("mouse over test!")
, false);
Example 2: js addeventlistener
var element=document.getElementById("some_id");
var listener=element.addEventListener('click',function(event){
});