Hi guys!!
Would it be possible to call a function passing an argument internally when declaring an event listener?
Something like this:
this.app.on('setModeGame:VR', this._setModeGame, 'VR', this);
NameScript.prototype._setModeGame = function(value, scope) {
console.log(value); // this returns undefined... I want to get 'VR' string.
};
In this case value returns undefined… The only way that has worked is passing the argument on the fire event but I would like to be able to pass the value internally.
Thanks!!!