MCPcopy Index your code
hub / github.com/bigskysoftware/_hyperscript / resolve

Method resolve

www/js/_hyperscript.js:8092–8118  ·  view source on GitHub ↗
(context, { on, time, evt, from, classRef, classRef2, classRefs, betweenValues })

Source from the content-addressed store, hash-verified

8090 }
8091 }
8092 resolve(context, { on, time, evt, from, classRef, classRef2, classRefs, betweenValues }) {
8093 if (time) {
8094 return new Promise((resolve) => {
8095 this.toggle(context, on, classRef, classRef2, classRefs, betweenValues);
8096 setTimeout(() => {
8097 this.toggle(context, on, classRef, classRef2, classRefs, betweenValues);
8098 resolve(this.findNext(context));
8099 }, time);
8100 });
8101 } else if (evt) {
8102 return new Promise((resolve) => {
8103 var target = from || context.me;
8104 target.addEventListener(
8105 evt,
8106 () => {
8107 this.toggle(context, on, classRef, classRef2, classRefs, betweenValues);
8108 resolve(this.findNext(context));
8109 },
8110 { once: true }
8111 );
8112 this.toggle(context, on, classRef, classRef2, classRefs, betweenValues);
8113 });
8114 } else {
8115 this.toggle(context, on, classRef, classRef2, classRefs, betweenValues);
8116 return this.findNext(context);
8117 }
8118 }
8119 };
8120 var HideCommand = class _HideCommand extends VisibilityCommand {
8121 static keyword = "hide";

Callers

nothing calls this directly

Calls 3

toggleMethod · 0.95
setTimeoutFunction · 0.50
findNextMethod · 0.45

Tested by

no test coverage detected