Closed fuyoo closed 3 years ago
i'm can't find a way to call the rust func in the javascript file..
i am try interop example
const view = Window.this
view. calc_sum()
the console tell me method undefined.
How did you solve this?
How did you solve this?
at the rust side impl
impl sciter::EventHandler for EventHandler {
fn get_subscription(&mut self) -> Option<sciter::dom::event::EVENT_GROUPS> {
Some(sciter::dom::event::default_events() | sciter::dom::event::EVENT_GROUPS::HANDLE_METHOD_CALL)
}
at the view side:
const view = Window.this
view.xcall("sum",1, 2);
detail at here #96
and the sciter.js doc at here doc
default_events()
should be adjusted to cover JS. Will do.
default_events()
should be adjusted to cover JS. Will do.
that's great, thank's a lot!
Might be nice to release the version with the fix on crates.io :)
Those tis based examples don't work in the new SDK. Do you have any plans to adapt the new SDK?