/**
* Template how to implement a Modal
* @extends Modal
*/
class modalTemplate extends Modal{
constructor()
{
let idLangMap = new Map([
["some-id", () => "languageManager.currentLang.somePage.someString"]
])
super(idLangMap, "contentDiv");
}
get html()
{
return `
<div></div>
`;
}
setup()
{
let template = document.createElement("template");
template.innerHTML = this.html.trim();
document.body.appendChild(template.content.firstElementChild)
// a fragment can be added via document.appendChild() without error and does not add anything to the dom to keep
// the implementation of setup consistent
return new DocumentFragment()
}
updateLang()
{
//remove if no class specific code is needed, you may want to extend your own code with the base implementation
}
updateColor()
{
//remove if no class specific code is needed, you may want to extend your own code with the base implementation
}
addEventListeners()
{
//remove if no class specific code is needed, you may want to extend your own code with the base implementation
}
afterPyodideLoaded()
{
//remove if no class specific code is needed, you may want to extend your own code with the base implementation
}
}