triggerServerEvent in static function

I wanted to call “this.triggerServerEvent” from a static function

        static clickHandler (a) {
            var obj = new XojoWeb.JSONItem;
            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?

The problem is that triggerServerEvent is an instance method and in a static method, “this” refers to the class.

Out of curiosity, what’s the purpose of making the method static anyway?

After many tries, I got the best results by making a Leafled map using static functions.

Maybe I’ll show an example at the link

Clicking on “Marker” should call the “pressedMarker” function

I thought about it and now I think it’s probably impossible