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

Method resolve

tools/common/_hyperscript.iife.js:5613–5634  ·  view source on GitHub ↗
(context, args)

Source from the content-addressed store, hash-verified

5611 return new _AppendCommand(value, targetExpr, assignable);
5612 }
5613 resolve(context, args) {
5614 var { target, value, ...lhs } = args;
5615 if (Array.isArray(target)) {
5616 target.push(value);
5617 context.meta.runtime.notifyMutation(target);
5618 } else if (target instanceof Set) {
5619 target.add(value);
5620 context.meta.runtime.notifyMutation(target);
5621 } else if (target instanceof Element) {
5622 if (value instanceof Element) {
5623 target.insertAdjacentElement("beforeend", value);
5624 } else {
5625 target.insertAdjacentHTML("beforeend", value);
5626 }
5627 context.meta.runtime.processNode(target);
5628 } else if (this.assignable) {
5629 this._target.set(context, lhs, (target || "") + value);
5630 } else {
5631 throw new Error("Unable to append a value!");
5632 }
5633 return this.findNext(context);
5634 }
5635 };
5636 var PickCommand = class _PickCommand extends Command {
5637 static keyword = "pick";

Callers

nothing calls this directly

Calls 4

notifyMutationMethod · 0.45
processNodeMethod · 0.45
setMethod · 0.45
findNextMethod · 0.45

Tested by

no test coverage detected