Closed c-harding closed 5 years ago
This is based upon #37, so that one needs to be merged first.
It's worth noting that the rerun prevention checks don't work with the current implementation of body: html(…)
, because the elements are destroyed and recreated when yield
(or whatever it's renamed to after #39) is used. I would propose either deprecating the yield parameter in html
form, or finding some other solution for interpolation. For example, where yield
is called, interpolate a new object with a fresh id
, then substitute the existing children to that location. This will require a bit of external change though, in the case that the user tries to manipulate the yield
variable as a string.
This works by rerunning all previously run rules on the newly added subtree after running a rule with a body stage, ensuring that the same rule is never run on the same element twice.