fix: setnode method for rehydration code
This commit is contained in:
1 parent
014eb974f7
commit
f26f704b6b
6 files changed
+61
-30
No files matched your search
@@ -12,7 +12,7 @@ extern "C" {
|
||||
pub fn new(arg: Element) -> Interpreter;
|
||||
|
||||
#[wasm_bindgen(method)]
|
||||
pub fn set_node(this: &Interpreter, id: usize, node: Node);
|
||||
pub fn SetNode(this: &Interpreter, id: usize, node: Node);
|
||||
|
||||
#[wasm_bindgen(method)]
|
||||
pub fn PushRoot(this: &Interpreter, root: u64);
|
||||
|
||||
@@ -20,6 +20,9 @@ export class Interpreter {
|
||||
pop() {
|
||||
return this.stack.pop();
|
||||
}
|
||||
SetNode(id, node) {
|
||||
this.nodes[id] = node;
|
||||
}
|
||||
PushRoot(root) {
|
||||
const node = this.nodes[root];
|
||||
this.stack.push(node);
|
||||
|
||||
Reference in new issue
Block a user