Your listener id (must be unique)
Your listener function
// log a message in the console once the button submit is clicked.
JMap.Event.Query.on.beforeSubmit(
"custom-query-before-submit",
params => console.log("A query to the server will be done", params)
)
JMap.Event.Query.on.beforeSubmit
This event is triggered when a query is submitted, before the call to the server is made.