mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
fix Deluge.Events.fire
This commit is contained in:
parent
faae99d3d8
commit
fda01f59a7
1 changed files with 3 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue