Skip to content

Instantly share code, notes, and snippets.

var aaa = function() {
console.log('aaa');
}
$(document).on('aaa', aaa);
aaa = function() {
console.log('bbb');
}
@ingoe
ingoe / gist:11265248
Created April 24, 2014 18:49
window addEventHandler test
describe('window.postMessage test', function() {
var o;
beforeEach(function(done) {
o = {
f: function() {}
};
// won't pass the spec
// window.addEventListener('message', o.f, false);
spyOn(o, 'f').and.callFake(function() {
done();