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

Method constructor

modules/network/dns/dnsresolverdoh.js:121–133  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

119
120class Resolver {
121 constructor(options) {
122 manager ??= new Manager;
123
124 manager.add({
125 request: this,
126 host: options.host.toString(),
127 onResolved: options.onResolved,
128 onError: options.onError,
129 });
130
131 if (options.target)
132 this.target = options.target;
133 }
134 close() {
135 manager.remove(this);
136 }

Callers

nothing calls this directly

Calls 2

addMethod · 0.65
toStringMethod · 0.45

Tested by

no test coverage detected