Asked by: Aloia Burchardasked in category: General Last Updated: 25th January, 2020
Beside above, how do I use addEventListener?
Definition and Usage Tip: Use the document. removeEventListener() method to remove an event handler that has been attached with the addEventListener() method. Tip: Use the element. addEventListener() method to attach an event handler to a specified element.
What is the purpose of third argument of addEventListener method?
addEventListener listens for both capture phase and bubbling phase events. The third parameter (called useCapture in the specification) allows the programmer to specify which phase they want to use. In modern browsers, this defaults to false .