Put in order · JavaScript and TypeScript course · Module 8: Events and the DOM

Order: Custom Event

Arrange the elements for creating and dispatching a custom event:

Items to put in order

  • { detail: data })
  • CustomEvent('myEvent',
  • const event = new
  • element.dispatchEvent(event)

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