function on(eventName: "accountChanged", listener: () => void): void;
Code Example
if (!webln.on) { alert('not supported'); }
await webln.enable();
webln.on("accountChanged", accountChangedHandler); // callback is executed once account is changed in provided with multiple accounts
function accountChangedHandler() {
console.log("Account Changed!");
}