mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 16:57:59 +01:00
Fuck with :regressions a bit.
This commit is contained in:
@@ -635,12 +635,17 @@ const liberator = (function () //{{{
|
||||
|
||||
registerObserver: registerObserver,
|
||||
|
||||
triggerObserver: function (type, data)
|
||||
unregisterObserver: function (type, callback)
|
||||
{
|
||||
observers = observers.filter(function ([t, c]) t != type || c != callback);
|
||||
},
|
||||
|
||||
triggerObserver: function (type)
|
||||
{
|
||||
for (let [,[thistype, callback]] in Iterator(observers))
|
||||
{
|
||||
if (thistype == type)
|
||||
callback(data);
|
||||
callback.apply(null, Array.slice(arguments, 1));
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user