diff --git a/dropdown.js b/dropdown.js index b70c045..c471a8e 100644 --- a/dropdown.js +++ b/dropdown.js @@ -88,6 +88,10 @@ export class Dropdown extends HTMLElement { this.dialogEl.close() } + clear() { + this.dialogEl.replaceChildren() + } + add(text, handler = undefined) { const btn = document.createElement('button') btn.innerText = text