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

20 lines
434 B
JavaScript
Raw Normal View History

(function (globalScope) {
globalScope.Events = {
2015-03-05 20:22:43 -07:00
on: function (obj, eventName, selector, fn) {
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) {
2015-03-05 20:22:43 -07:00
jQuery(obj).off(eventName, selector, fn);
},
trigger: function (obj, eventName, params) {
2015-02-16 09:47:30 -07:00
jQuery(obj).trigger(eventName, params);
}
};
2015-11-28 14:26:31 -07:00
})(window);