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

Method _onRecipient

client/scripts/ui.js:322–334  ·  view source on GitHub ↗
(recipient)

Source from the content-addressed store, hash-verified

320 }
321
322 _onRecipient(recipient) {
323 this._recipient = recipient;
324 this._handleShareTargetText();
325 this.show();
326
327 const range = document.createRange();
328 const sel = window.getSelection();
329
330 range.selectNodeContents(this.$text);
331 sel.removeAllRanges();
332 sel.addRange(range);
333
334 }
335
336 _handleShareTargetText() {
337 if (!window.shareTargetText) return;

Callers 1

constructorMethod · 0.95

Calls 2

showMethod · 0.80

Tested by

no test coverage detected