Open martinpengellyphillips opened 5 years ago
I can't remember the original rationale for not wrapping isolate methods so maybe it's no longer useful in any way. If you want to open up a pull request we can look at fixing this :)
Thanks for the issue
Just started using Cycle.JS and cycle-restart so the following may be just my ignorance :)
When using
isolate
in an app, no changes to the DOM code are loaded visibly by cycle-restart. Ifisolate
is not used then the issue does not occur and updates to the code are reflected visibly after restart.Digging into the code it seems that
restartable
explicitly does not wrapisolate
methods (though I couldn't find the rationale for this in source / commit history).Meanwhile, the isolateSource method on the DOM driver (v22.3.0) returns a brand new object. This new object is therefore never wrapped and its stream of events not recorded by cycle-restart for replay later.
Commenting out the logic in cycle-restart that excludes wrapping
isolate
functions solves the issue with no noticable side-effects: