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