arozwalak
7/2/2015 - 12:19 PM

Javascript: Definicja metody

Javascript: Definicja metody

Function.prototype.method = function (name, func) {
    this.prototype[name] = func;
    return this;
};