MCPcopy Create free account
hub / github.com/SnapDrop/snapdrop / _initDom

Method _initDom

client/scripts/ui.js:98–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96 }
97
98 _initDom() {
99 const el = document.createElement('x-peer');
100 el.id = this._peer.id;
101 el.innerHTML = this.html();
102 el.ui = this;
103 el.querySelector('svg use').setAttribute('xlink:href', this._icon());
104 el.querySelector('.name').textContent = this._displayName();
105 el.querySelector('.device-name').textContent = this._deviceName();
106 this.$el = el;
107 this.$progress = el.querySelector('.progress');
108 }
109
110 _bindListeners(el) {
111 el.querySelector('input').addEventListener('change', e => this._onFilesSelected(e));

Callers 1

constructorMethod · 0.95

Calls 4

htmlMethod · 0.95
_iconMethod · 0.95
_displayNameMethod · 0.95
_deviceNameMethod · 0.95

Tested by

no test coverage detected