summaryrefslogtreecommitdiff
path: root/html/content/js/Utils/Event.js
blob: 7a5ada8add796723cb37d948b449a4e2cd93e9af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
define(function () {
    return function () {
        var handlers = [];
        this.bind = function (handler) {
            handlers.push(handler);
        }
        this.trigger = function (_this, arguments) {
            for (var i = 0; i < handlers.length; i++) {
                handlers[i].apply(_this, arguments);
            }
        }
    }
});