Question · JavaScript and TypeScript course · Module 8: Events and the DOM

Bubbling in Custom Events

What is the default value of the bubbles option in the CustomEvent constructor?

Answer options

  • true - Custom Events propagate up the DOM by default
  • false - Custom Events do NOT propagate up the DOM by default
  • null - you must always explicitly set bubbles
  • undefined - depends on the type of element on which we emit the event

You can check the correct answer by solving this task in the CodeWorlds game.