jellyfin-web/dashboard-ui/thirdparty/apiclient/events.js

23 lines
548 B
JavaScript
Raw Normal View History

(function (globalScope) {
globalScope.Events = {
on: function (obj, eventName, fn) {
Logger.log('event.on ' + eventName);
jQuery(obj).on(eventName, fn);
},
off: function (obj, eventName, fn) {
Logger.log('event.off ' + eventName);
jQuery(obj).off(eventName, fn);
},
trigger: function (obj, eventName, params) {
Logger.log('event.trigger ' + eventName);
2015-02-16 09:47:30 -07:00
jQuery(obj).trigger(eventName, params);
}
};
})(window);