Add setNewTab() method

This commit is contained in:
Thomas Brouard 2022-05-23 19:17:47 +02:00
parent fad70427d5
commit 718be68e38
4 changed files with 24 additions and 12 deletions

View file

@ -59,6 +59,10 @@ class TabGroup extends HTMLElement {
}
}
setNewTab (newTab) {
this.options.newTab = newTab;
}
addTab (args = this.options.newTab) {
if (typeof args === "function") {
args = args(this);