Make events a global singleton

pull/1047/head
Jonathan Frederic 10 years ago
parent 5b337bbfee
commit 08e968d7e9

File diff suppressed because one or more lines are too long

@ -9,16 +9,18 @@
// events.on("event.Namespace", function () { do_stuff(); });
// });
define(['base/js/namespace'], function(IPython) {
define(['base/js/namespace'], function(Jupyter) {
"use strict";
var Events = function () {};
var events = new Events();
// Events singleton
if (!window._Events) {
window._Events = function () {};
window._events = new window._Events();
}
// Backwards compatability.
IPython.Events = Events;
IPython.events = events;
Jupyter.Events = window._Events;
Jupyter.events = window._events;
return $([events]);
return $([window._events]);
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save