File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -17,4 +17,24 @@ crate::macro_import::wasm_bindgen_react! {
1717 props: JsValue ,
1818 children: js_sys:: Array ,
1919 ) -> Element ;
20+
21+ /// # Safety
22+ ///
23+ /// the function in `element_type` closure should live longer enough
24+ #[ wasm_bindgen( variadic, js_namespace = React , js_name = createElement) ]
25+ pub unsafe fn create_element_fn(
26+ element_type: & Closure <dyn Fn ( js_sys:: Object ) -> Element >,
27+ props: JsValue ,
28+ children: js_sys:: Array ,
29+ ) -> Element ;
30+
31+ /// # Safety
32+ ///
33+ /// the function in `element_type` closure should live longer enough
34+ #[ wasm_bindgen( variadic, js_namespace = React , js_name = createElement) ]
35+ pub unsafe fn create_element_fn_mut(
36+ element_type: & Closure <dyn FnMut ( js_sys:: Object ) -> Element >,
37+ props: JsValue ,
38+ children: js_sys:: Array ,
39+ ) -> Element ;
2040}
You can’t perform that action at this time.
0 commit comments