The CustomEvent interface can be used to attach custom data to an event generated by an application. As an alternative to CustomEvent, you can subclass the Event interface to add custom data and behavior. Note: If used to attempt to communicate between a web extension content script and a web page script, a non-string detail property throws with "Permission denied to access property" in Firefox. T