You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to add CustomEvent so that a library I've built will work in both browser and Node. Your code looks like its what is needed EXCEPT it calls document.createEventObject, and in node there is document.createEvent, but not document.createEventObject.
Do you know of a version of custom-event that works in Node? Or is there a way to add that functionality.
The text was updated successfully, but these errors were encountered:
A bit of digging and I've found a solution for myself which is to define "document" before requiring custom-event, however this breaks the common practice of requiring everything at the top of the file BEFORE creating anything.
I'm trying to add CustomEvent so that a library I've built will work in both browser and Node. Your code looks like its what is needed EXCEPT it calls document.createEventObject, and in node there is document.createEvent, but not document.createEventObject.
Do you know of a version of custom-event that works in Node? Or is there a way to add that functionality.
The text was updated successfully, but these errors were encountered: