on method
Implementation
EventManager on(Window window, EventType type, WindowListener callback) {
var key = type.name;
log("[event] register listener $key for $window");
// w.id -> w -> type -> [cb]
if (_listeners[window.id] == null) _listeners[window.id] = {};
if (_listeners[window.id]![key] == null) _listeners[window.id]![key] = {};
if (_listeners[window.id]![key]![window] == null)
_listeners[window.id]![key]![window] = [];
if (!_listeners[window.id]![key]![window]!.contains(callback))
_listeners[window.id]![key]![window]!.add(callback);
return this;
}