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

Method resolve

tools/common/_hyperscript.iife.js:7669–7695  ·  view source on GitHub ↗
(context, { on, time, evt, from, classRef, classRef2, classRefs, betweenValues })

Source from the content-addressed store, hash-verified

7667 }
7668 }
7669 resolve(context, { on, time, evt, from, classRef, classRef2, classRefs, betweenValues }) {
7670 if (time) {
7671 return new Promise((resolve) => {
7672 this.toggle(context, on, classRef, classRef2, classRefs, betweenValues);
7673 setTimeout(() => {
7674 this.toggle(context, on, classRef, classRef2, classRefs, betweenValues);
7675 resolve(this.findNext(context));
7676 }, time);
7677 });
7678 } else if (evt) {
7679 return new Promise((resolve) => {
7680 var target = from || context.me;
7681 target.addEventListener(
7682 evt,
7683 () => {
7684 this.toggle(context, on, classRef, classRef2, classRefs, betweenValues);
7685 resolve(this.findNext(context));
7686 },
7687 { once: true }
7688 );
7689 this.toggle(context, on, classRef, classRef2, classRefs, betweenValues);
7690 });
7691 } else {
7692 this.toggle(context, on, classRef, classRef2, classRefs, betweenValues);
7693 return this.findNext(context);
7694 }
7695 }
7696 };
7697 var HideCommand = class _HideCommand extends VisibilityCommand {
7698 static keyword = "hide";

Callers

nothing calls this directly

Calls 3

toggleMethod · 0.95
setTimeoutFunction · 0.70
findNextMethod · 0.45

Tested by

no test coverage detected