Update javascript-event-bubbling-capturing-delegation.md

This commit is contained in:
Isabelle Viktoria Maciohsek
2022-02-07 20:57:34 +02:00
committed by GitHub
parent ad5da50a57
commit bb013f40c2

View File

@ -54,7 +54,7 @@ You can use event capturing by applying a third argument to [`EventTarget.addEve
```js
// Capture phase
ancestors.forEach(a => {
a.addEventListener('click', event => {
a.addEventListener('click', e => {
console.log(`Hello from ${e.currentTarget}`);
}, true);
});