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

Method resolve

tools/common/_hyperscript.iife.js:6061–6081  ·  view source on GitHub ↗
(ctx, { target: to, offset })

Source from the content-addressed store, hash-verified

6059 return new _GoCommand(target, null, false, newWindow);
6060 }
6061 resolve(ctx, { target: to, offset }) {
6062 if (this.back) {
6063 window.history.back();
6064 } else if (this.scrollOptions) {
6065 _resolveScroll(ctx, to, offset, this.plusOrMinus, this.scrollOptions);
6066 } else if (to != null) {
6067 if (to instanceof Element) {
6068 to.scrollIntoView({ block: "start", inline: "nearest" });
6069 } else {
6070 var str = String(to);
6071 if (str.startsWith("#")) {
6072 window.location.hash = str;
6073 } else if (this.newWindow) {
6074 window.open(str);
6075 } else {
6076 window.location.href = str;
6077 }
6078 }
6079 }
6080 return this.findNext(ctx);
6081 }
6082 };
6083
6084 // src/parsetree/commands/setters.js

Callers

nothing calls this directly

Calls 2

_resolveScrollFunction · 0.70
findNextMethod · 0.45

Tested by

no test coverage detected