MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / resolve

Method resolve

www/js/_hyperscript.esm.js:8144–8171  ·  view source on GitHub ↗
(ctx, { target })

Source from the content-addressed store, hash-verified

8142 return new _HideCommand(targetExpr, when, hideShowStrategy);
8143 }
8144 resolve(ctx, { target }) {
8145 var runtime2 = ctx.meta.runtime;
8146 var cmd = this;
8147 runtime2.nullCheck(target, this.targetExpr);
8148 if (this.when) {
8149 var result = runtime2.implicitLoopWhen(
8150 target,
8151 this.when,
8152 ctx,
8153 function(elt) {
8154 cmd.hideShowStrategy("hide", elt, null, runtime2);
8155 },
8156 function(elt) {
8157 cmd.hideShowStrategy("show", elt, null, runtime2);
8158 }
8159 );
8160 if (result && result.then) {
8161 return result.then(function() {
8162 return runtime2.findNext(cmd, ctx);
8163 });
8164 }
8165 } else {
8166 runtime2.implicitLoop(target, function(elt) {
8167 cmd.hideShowStrategy("hide", elt, null, runtime2);
8168 });
8169 }
8170 return runtime2.findNext(this, ctx);
8171 }
8172};
8173var ShowCommand = class _ShowCommand extends VisibilityCommand {
8174 static keyword = "show";

Callers

nothing calls this directly

Calls 4

nullCheckMethod · 0.45
implicitLoopWhenMethod · 0.45
findNextMethod · 0.45
implicitLoopMethod · 0.45

Tested by

no test coverage detected