mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
parent
b27034efa5
commit
8372d3f6d8
27 changed files with 69 additions and 68 deletions
|
@ -409,7 +409,7 @@ declare_types! {
|
|||
|
||||
Ok(JsUndefined::new().as_value(&mut cx))
|
||||
}
|
||||
method call_callback(mut cx) {
|
||||
method invoke_callback(mut cx) {
|
||||
let callback_name = cx.argument::<JsString>(0)?.value();
|
||||
let arguments = cx.argument::<JsArray>(1)?.to_vec(&mut cx)?;
|
||||
let this = cx.this();
|
||||
|
@ -444,7 +444,7 @@ declare_types! {
|
|||
|
||||
let res = run_scoped(&mut cx,this.downcast().unwrap(), || {
|
||||
component.description()
|
||||
.call_callback(component.borrow(), callback_name.as_str(), args.as_slice())
|
||||
.invoke_callback(component.borrow(), callback_name.as_str(), args.as_slice())
|
||||
.map_err(|()| "Cannot emit callback".to_string())
|
||||
})?;
|
||||
to_js_value(res, &mut cx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue