Top "Addeventlistener" questions

a DOM event method that adds an event listener to a given DOM node

Javascript - How to Remove DOM elements using click events and classes?

I am having some difficulty using parentNode.removeChild(). I have a list of 'items' in an un-ordered list, each have …

javascript for-loop addeventlistener removechild
In Node.js, what's "on"?

In official doc, there is some sample code: var req = http.request(options, function(res) { console.log('STATUS: ' + res.…

node.js addeventlistener
Fire a function when innerHTML of element changes?

I want to fire a function when the innerHTML of a div element changes. Been testing with element.addEventListener('DOMCharacterDataModified', …

javascript html function innerhtml addeventlistener
How can I use a 'keydown' event listener on a div?

I am trying to capture keydown events where specific keys correspond to specific audio clips to be played. I've been …

javascript addeventlistener keydown
postMessage between cross-domain windows not working in IE10 (it works for frames)

I followed this tutorial http://davidwalsh.name/window-postmessage, and created cross domain messaging scripts which works in Chrome and Firefox …

internet-explorer cross-domain addeventlistener postmessage
addEventListener, for(), index. how to use closure?

I have this code: var items = this.llistat.getElementsByTagName('a'); for( var i = 0; i < items.length; i++ ){ items[i].…

javascript for-loop closures addeventlistener
addEventListener() not working on list of elements

I have an array of paragraph elements. When each <p> is clicked on I want that element removed …

javascript for-loop addeventlistener removechild
Replace passive addEventListener to onTouchStart method

I want to replace document.addEventListener('touchstart', handler, {passive: true}); to onTouchStart={handler} So if I had passive flag on …

reactjs addeventlistener passive-event-listeners ontouchstart
Why does addEventListener fire before the event if at all?

I was experimenting [in jsfiddle] w/a function created to append a newly created TextNode to the <p> …

javascript for-loop event-handling addeventlistener