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

Method set

tools/common/_hyperscript.iife.js:3906–3922  ·  view source on GitHub ↗
(ctx, lhs, value)

Source from the content-addressed store, hash-verified

3904 return { root: this.root };
3905 }
3906 set(ctx, lhs, value) {
3907 ctx.meta.runtime.nullCheck(lhs.root, this.root);
3908 if (this._isAttribute) {
3909 ctx.meta.runtime.implicitLoop(lhs.root, (elt) => {
3910 value == null ? elt.removeAttribute(this._prop) : elt.setAttribute(this._prop, value);
3911 });
3912 } else if (this._isStyle) {
3913 ctx.meta.runtime.implicitLoop(lhs.root, (elt) => {
3914 elt.style[this._prop] = value;
3915 });
3916 } else {
3917 var runtime2 = ctx.meta.runtime;
3918 runtime2.implicitLoop(lhs.root, (elt) => {
3919 runtime2.setProperty(elt, this._prop, value);
3920 });
3921 }
3922 }
3923 };
3924 var PossessiveExpression = class _PossessiveExpression extends Expression {
3925 static grammarName = "possessive";

Callers

nothing calls this directly

Calls 3

nullCheckMethod · 0.45
implicitLoopMethod · 0.45
setPropertyMethod · 0.45

Tested by

no test coverage detected