MCPcopy Create free account
hub / github.com/UNLINEARITY/Obsidian-CodeSpace / attachEvents

Method attachEvents

src/dropdown.ts:172–183  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

170 }
171
172 private attachEvents() {
173 this.selectEl.addEventListener("click", (e) => {
174 e.stopPropagation();
175 this.toggle();
176 });
177
178 this.containerEl.ownerDocument.addEventListener("click", (e) => {
179 if (this.isOpen && !this.containerEl.contains(e.target as Node)) {
180 this.close();
181 }
182 });
183 }
184
185 addOption(value: string, label: string) {
186 this.options.set(value, label);

Callers 1

constructorMethod · 0.95

Calls 2

toggleMethod · 0.95
closeMethod · 0.95

Tested by

no test coverage detected