kbjr/Events.js — Issue #3: Invoking an event throws an error on Chrome
Author: kanduvisla
Created: 2011-11-23 09:26:26+00:00
State: open

I tried the following code:

Events.bind(window, 'resize', function(e){
console.log('Hello World');
});
Events.invoke(window, 'resize');

But Chrome threw the following error:

Uncaught [object Object] on events.js:1015

Inspecting line 1015 of `events.js` showed me that you called a function called `despatchEvent` instead of `dispatchEvent`. I think this is a typo? Anyway, fixing this (as well as the same typo on line 60), did prevent the script from throwing an error, but the event still wasn't invoked / executed.