implement onmounted for the web renderer
This commit is contained in:
1 parent
1aad285853
commit
cb5cb56ad3
2 files changed
+48
-11
No files matched your search
@@ -116,6 +116,10 @@ mod js {
|
||||
export function set_node(id, node) {
|
||||
nodes[id] = node;
|
||||
}
|
||||
export function get_node(id) {
|
||||
console.log(nodes, id);
|
||||
return nodes[id];
|
||||
}
|
||||
export function initilize(root, handler) {
|
||||
listeners.handler = handler;
|
||||
nodes = [root];
|
||||
@@ -166,6 +170,9 @@ mod js {
|
||||
#[wasm_bindgen]
|
||||
pub fn set_node(id: u32, node: Node);
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn get_node(id: u32) -> Node;
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn initilize(root: Node, handler: &Function);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user