The read-only detail property of the CustomEvent interface returns any data passed when initializing the event.
detail
MDN Reference