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

Method resolve

www/js/_hyperscript.js:5508–5529  ·  view source on GitHub ↗
(context, { thing, from, inElt, withinElt })

Source from the content-addressed store, hash-verified

5506 return this.scanForwardArray(start, Array.from(array).reverse(), match, wrap);
5507 }
5508 resolve(context, { thing, from, inElt, withinElt }) {
5509 var css = thing.css;
5510 if (css == null) {
5511 throw new Error("Expected a CSS value to be returned by " + this.thingElt.sourceFor());
5512 }
5513 if (this.inSearch) {
5514 if (inElt) {
5515 if (this.forwardSearch) {
5516 return this.scanForwardArray(from, inElt, css, this.wrapping);
5517 } else {
5518 return this.scanBackwardsArray(from, inElt, css, this.wrapping);
5519 }
5520 }
5521 } else {
5522 var root = withinElt ?? document.body;
5523 if (this.forwardSearch) {
5524 return this.scanForwardQuery(from, root, css, this.wrapping);
5525 } else {
5526 return this.scanBackwardsQuery(from, root, css, this.wrapping);
5527 }
5528 }
5529 }
5530 };
5531 var PositionalExpression = class _PositionalExpression extends Expression {
5532 static grammarName = "positionalExpression";

Callers

nothing calls this directly

Calls 5

scanForwardArrayMethod · 0.95
scanBackwardsArrayMethod · 0.95
scanForwardQueryMethod · 0.95
scanBackwardsQueryMethod · 0.95
sourceForMethod · 0.45

Tested by

no test coverage detected