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

23 lines
588 B
JavaScript
Raw Normal View History

(function (globalScope) {
globalScope.Events = {
2015-03-05 20:22:43 -07:00
on: function (obj, eventName, selector, fn) {
Logger.log('event.on ' + eventName);
2015-03-05 20:22:43 -07:00
jQuery(obj).on(eventName, selector, fn);
},
2015-03-05 20:22:43 -07:00
off: function (obj, eventName, selector, fn) {
Logger.log('event.off ' + eventName);
2015-03-05 20:22:43 -07:00
jQuery(obj).off(eventName, selector, 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);