Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
For every Browser except lower than IE9, which you shouldn't support anyway (imho).
var evt = document.createEvent('Event');
evt.initEvent('bbEvent', true, true);
var customEventData = {
dataString: "Hello",
dataArray: ['W', 'o', 'r', 'l', 'd']
} = customEventData;
window.addEventListener('bbEvent', function (event) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.