class ActionEntry extends HTMLElement{ constructor(title, actionCallback, hideMenuCallback){ super(); this.title = title; this.actionCallback = actionCallback; this.hideMenuCallback = hideMenuCallback; } performActionCallback(){ this.hideMenuCallback(); this.actionCallback() } connectedCallback(){ this.render(); this.getElementsByClassName("action-entry-title")[0].onclick = () => {this.performActionCallback();}; this.getElementsByTagName("img")[0].onclick = () => {this.performActionCallback();}; } render(){ this.innerHTML = `