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

Method resolve

www/js/_hyperscript.js:5956–5977  ·  view source on GitHub ↗
(context, args)

Source from the content-addressed store, hash-verified

5954 return new _AppendCommand(value, targetExpr, assignable);
5955 }
5956 resolve(context, args) {
5957 var { target, value, ...lhs } = args;
5958 if (Array.isArray(target)) {
5959 target.push(value);
5960 context.meta.runtime.notifyMutation(target);
5961 } else if (target instanceof Set) {
5962 target.add(value);
5963 context.meta.runtime.notifyMutation(target);
5964 } else if (target instanceof Element) {
5965 if (value instanceof Element) {
5966 target.insertAdjacentElement("beforeend", value);
5967 } else {
5968 target.insertAdjacentHTML("beforeend", value);
5969 }
5970 context.meta.runtime.processNode(target);
5971 } else if (this.assignable) {
5972 this._target.set(context, lhs, (target || "") + value);
5973 } else {
5974 throw new Error("Unable to append a value!");
5975 }
5976 return this.findNext(context);
5977 }
5978 };
5979 var PickCommand = class _PickCommand extends Command {
5980 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