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

Method install

www/js/_hyperscript.esm.js:9823–9850  ·  view source on GitHub ↗
(target, source, args, runtime2)

Source from the content-addressed store, hash-verified

9821 this.displayName = "when ... changes";
9822 }
9823 install(target, source, args, runtime2) {
9824 var feature = this;
9825 queueMicrotask(function() {
9826 for (var i = 0; i < feature.exprs.length; i++) {
9827 (function(expr) {
9828 runtime2.reactivity.createEffect(
9829 function() {
9830 return expr.evaluate(
9831 runtime2.makeContext(target, feature, target, null)
9832 );
9833 },
9834 function(newValue) {
9835 var ctx = runtime2.makeContext(target, feature, target, null);
9836 ctx.result = newValue;
9837 ctx.meta.reject = function(err) {
9838 console.error(err.message ? err.message : err);
9839 runtime2.triggerEvent(target, "exception", { error: err });
9840 };
9841 ctx.meta.onHalt = function() {
9842 };
9843 feature.start.execute(ctx);
9844 },
9845 { element: target }
9846 );
9847 })(feature.exprs[i]);
9848 }
9849 });
9850 }
9851};
9852
9853// src/parsetree/features/bind.js

Callers

nothing calls this directly

Calls 5

createEffectMethod · 0.45
evaluateMethod · 0.45
makeContextMethod · 0.45
triggerEventMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected