element.removeEventListenerbecause we do not have a reference to the handler, while in the second case, it's possible to do
myElement.removeEventListener("click", processEvent, false). If
useCaptureindicates that the user wishes to initiate capture. After initiating capture, all events of the specified type will be dispatched to the registered
listenerbefore being dispatched to any
EventTargetbeneath it in the DOM tree. Events which are bubbling upward through the tree will not trigger a listener designated to use capture. See DOM Level 3 Events for a detailed explanation. If not specified,
Note: For event listeners attached to the event target; the event is in the target phase, rather than capturing and bubbling phases. Events in the target phase will trigger all listeners on an element regardless of the
useCapture became optional only in more recent versions of the major browsers; for example, it was not optional prior to Firefox 6. You should provide this parameter for broadest compatibility.
true, the listener will receive synthetic events dispatched by web content (the default is
falsefor chrome and
truefor regular web pages). This parameter is only available in Gecko and is mainly useful for the code in add-ons and the browser itself. See Interaction between privileged and non-privileged pages for an example.