(ctx, { target: to, offset })
| 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 |
nothing calls this directly
no test coverage detected