mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 20:14:13 +00:00
fix Deluge.Events.fire
This commit is contained in:
parent
faae99d3d8
commit
fda01f59a7
@ -6,10 +6,11 @@ var Deluge = {
|
|||||||
Deluge.Events = {
|
Deluge.Events = {
|
||||||
_events: new Hash(),
|
_events: new Hash(),
|
||||||
|
|
||||||
fire: function(eventName) {
|
fire: function(eventName, arg) {
|
||||||
if (!this._events[eventName]) return;
|
if (!this._events[eventName]) return;
|
||||||
$each(this._events[eventName], function(fn) {
|
$each(this._events[eventName], function(fn) {
|
||||||
fn(Deluge.Client);
|
if ($type(fn) != 'function') return;
|
||||||
|
fn(arg);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user