Browse Source

add clear method

add-clear
Benjamin Atkin 3 years ago
parent
commit
a130ba958d
  1. 4
      dropdown.js

4
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

Loading…
Cancel
Save