Update javascript-event-bubbling-capturing-delegation.md
This commit is contained in:
committed by
GitHub
parent
ad5da50a57
commit
bb013f40c2
@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user