Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOM driver not restarted correctly when using isolate #72

Open
martinpengellyphillips opened this issue Aug 4, 2019 · 1 comment
Open

Comments

@martinpengellyphillips
Copy link

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. If isolate 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 wrap isolate 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:

// typeof name === 'string' && name.indexOf('isolate') !== -1 
@Widdershin
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants