I wanted to call “this.triggerServerEvent” from a static function
static clickHandler (a) {
var obj = new XojoWeb.JSONItem;
obj.set('title', a.target.options.title);
obj.set('lat', a.latlng.lat);
obj.set('lng', a.latlng.lng);
this.triggerServerEvent('pressedMarker', obj, false);
}
but I get the message:
Uncaught TypeError: this.triggerServerEvent is not a function
Is there any way to call triggerServerEvent from a static function?