mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REF] component: introduce RootFiber.setCounter and update scheduler
The goal is to be able to execute code whenever a root fiber is ready, and before the next animation frame
This commit is contained in:
committed by
Samuel Degueldre
parent
d80fad760c
commit
828be28653
@@ -245,7 +245,8 @@ export class ComponentNode<P extends object = any, E = any> implements VNode<Com
|
||||
_render(fiber: Fiber | RootFiber) {
|
||||
try {
|
||||
fiber.bdom = this.renderFn();
|
||||
fiber.root!.counter--;
|
||||
const root = fiber.root!;
|
||||
root.setCounter(root.counter - 1);
|
||||
} catch (e) {
|
||||
handleError({ node: this, error: e });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user