MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / parse

Method parse

www/js/_hyperscript.esm.js:8446–8453  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

8444 this.args = { target };
8445 }
8446 static parse(parser) {
8447 if (!parser.matchToken("focus")) return;
8448 var target = null;
8449 if (!parser.commandBoundary(parser.currentToken())) {
8450 target = parser.requireElement("expression");
8451 }
8452 return new _FocusCommand(target);
8453 }
8454 resolve(ctx, { target }) {
8455 (target || ctx.me).focus();
8456 return this.findNext(ctx);

Callers

nothing calls this directly

Calls 4

matchTokenMethod · 0.45
commandBoundaryMethod · 0.45
currentTokenMethod · 0.45
requireElementMethod · 0.45

Tested by

no test coverage detected