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

Method install

www/js/_hyperscript.js:9825–9852  ·  view source on GitHub ↗
(target, source, args, runtime2)

Source from the content-addressed store, hash-verified

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