Your listener id (must be unique)
Your listener function
// log a message in the console once the application is loaded
JMap.Application.Event.Main.on.appReady(
"custom-app-ready",
() => {
if (JMap.User.getToken() !== "-1") {
console.log(`Logged in username is: "${JMap.User.getUsername()}"`)
} else {
console.log(`No user logged in`)
}
}
)
JMap.Application.Event.Main.on.appReady
This event is triggered once when: