Convertigo Public Knowledge base

Call class page function from element Event

You can Edit page class to add your custom functions.

To call these function in an element Event, for example, you may:

_ Add an attribute, for example (contextmenu) in the element and directly call the function:

this['my_custom_function']() or my_custom_function()

_ Add an Event component to the Element and fill it with (contextmenu). Add a CustomAction component as a child, call your custom function:

page['my_custom_function'](params);

You may need to add the following code to prevent default browser behaviour:

event.preventDefault();

(c) Convertigo 2023 https://www.convertigo.com