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

Method resolve

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

Source from the content-addressed store, hash-verified

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