sciter-sdk / rust-sciter

Rust bindings for Sciter
https://sciter.com
MIT License
806 stars 75 forks source link

Live reloading #72

Closed asv7c2 closed 4 years ago

asv7c2 commented 4 years ago

I'm trying implement live reload and can't do that. Because separate thread must be spawned for directory watching and sciter::Window cannot be shared between threads. Any suggestions?

pravic commented 4 years ago

You can share a dom::Element, and then fire a corresponding event to trigger reloading. Something like element - fire event - event handler - reload.

It would be even better with (i)frames if possible.

asv7c2 commented 4 years ago

Thanks for idea. I done with EventHandler and document_complete.