MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / constructor

Method constructor

modules/io/dnssd/dnssd.js:757–767  ·  view source on GitHub ↗
(options, list)

Source from the content-addressed store, hash-verified

755 #onError;
756
757 constructor(options, list) {
758 this.#onReady = options.onReady;
759 this.#onError = options.onError;
760 this.#claim = dnssd.claim({
761 ...options,
762 onReady: () => this.#onReady?.(),
763 onError: () => this.#onError?.(),
764 });
765 this.#list = list;
766 list.push(this);
767 }
768 close() {
769 if (!this.#claim) return;
770 dnssd.unclaim(this.#claim);

Callers

nothing calls this directly

Calls 3

claimMethod · 0.45
#onErrorMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected