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

Method delete

www/js/_hyperscript.js:4214–4228  ·  view source on GitHub ↗
(ctx, lhs)

Source from the content-addressed store, hash-verified

4212 }
4213 }
4214 delete(ctx, lhs) {
4215 ctx.meta.runtime.nullCheck(lhs.root, this.root);
4216 var runtime2 = ctx.meta.runtime;
4217 var prop = this._prop;
4218 if (this._isAttribute) {
4219 runtime2.implicitLoop(lhs.root, (elt) => elt.removeAttribute(prop));
4220 } else if (this._isStyle) {
4221 runtime2.implicitLoop(lhs.root, (elt) => elt.style.removeProperty(prop));
4222 } else {
4223 runtime2.implicitLoop(lhs.root, (elt) => {
4224 delete elt[prop];
4225 runtime2.notifyMutation(elt);
4226 });
4227 }
4228 }
4229 };
4230 var PossessiveExpression = class _PossessiveExpression extends Expression {
4231 static grammarName = "possessive";

Callers

nothing calls this directly

Calls 3

nullCheckMethod · 0.45
implicitLoopMethod · 0.45
notifyMutationMethod · 0.45

Tested by

no test coverage detected