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

Method resolve

www/js/_hyperscript-max.js:8145–8172  ·  view source on GitHub ↗
(ctx, { target })

Source from the content-addressed store, hash-verified

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