The CustomEvent constructor may use to build a custom event: var myEvent = new CustomEvent('my event', 'detail:', 'bubbles:', 'cancelable:', 'composed:', ', ); In the same way that an event can be created using the Event constructor, a custom event can be created using the CustomEvent constructor.