MCPcopy
hub / github.com/SnapDrop/snapdrop / constructor

Method constructor

client/scripts/ui.js:210–214  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

208
209class Dialog {
210 constructor(id) {
211 this.$el = $(id);
212 this.$el.querySelectorAll('[close]').forEach(el => el.addEventListener('click', e => this.hide()))
213 this.$autoFocus = this.$el.querySelector('[autofocus]');
214 }
215
216 show() {
217 this.$el.setAttribute('show', 1);

Callers

nothing calls this directly

Calls 2

hideMethod · 0.95
$Function · 0.85

Tested by

no test coverage detected