Capturing

Report a typo

Which of the following code snippets are the correct ways to add an event listener for capturing phase?

A)

element.addEventListener('click', function() {
  console.log('capturing event');
},
{ capture: true } );

B)

element.addEventListener('click', function() {
  console.log('capturing event');
},
{ capture: false } );

C)

element.addEventListener('click', function() {
  console.log('capturing event');
});

D)

element.addEventListener('click', function() {
  console.log('capturing event');
}, false);

E)

element.addEventListener('click', function() {
  console.log('capturing event');
}, true);
Select one or more options from the list
___

Create a free account to access the full topic