The definition can be found below.
var CMenu = cc.Sprite.extend({
onClickCallback: null,
onClick: function (callback) {
this.onClickCallback = callback;
},
handleTouches: function (touch, evt) {
(this.hovered && this.onClickCallback) && this.onClickCallback();});
This is where it's being invoked.
backMenu.onClick(function () {
window.location.href = "http://www.test.com";
});
Question: Is
this.onClickCallback = this.onClickCallback()
?