1Startshop.Classes.Events = function () { 2 this.Events = {}; 3}; 4 5Startshop.Classes.Events.prototype.On = function ($sEvent, $fCallback) { 6 if (Startshop.Functions.isFunction($fCallback)) { 7 if (this.Events[$sEvent] === undefined) 8 this.Events[$sEvent] = []; 9 10 this.Events[$sEvent].push($fCallback); 11 } 12}; 13 14Startshop.Classes.Events.prototype.Call = function ($sEvent, $oParameters) { 15 if (this.Events[$sEvent] !== undefined) { 16 Startshop.Functions.forEach(this.Events[$sEvent], function ($sEvent, $fCallback) { 17 if (Startshop.Functions.isFunction($fCallback)) 18 $fCallback($oParameters); 19 }); 20 } 21}; 22 23Startshop.Classes.Events.prototype.Off = function ($sEvent) { 24 this.Events[$sEvent] = undefined; 25};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.