Eventcapture

General Info

Capture is a parameter that can be passed into an event listener. The parameter takes a boolean value indicating that events of this type will be dispatched to the registered listener before being dispatched to any EventTarget beneath it in the DOM tree. If not specified, defaults to false.

MDN for addEventListener

Wes Bos 30 Days of JS Video

Sample Code

  divs.forEach(div => div.addEventListener('click', callback, {
    capture: false,
    once: true
  }));