I am trying to create a custom javascript event. The event works and fires correctly, but the \'detail\' object that I\'m passing it is not available.
Here\'s the code i
obj.addEventListener("eventName", function(e) { console.log(e.your_property) }) var event = new CustomEvent("eventName"); event.your_property = { key: "value" }; obj.dispatchEvent(event);
You can create properties in your CustomEvent, when you dispatch you are sending it.