mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REF] reorganize file structure
in order to separate compiler/ and runtime/ code
This commit is contained in:
committed by
Sam Degueldre
parent
e4b810c027
commit
22a79cdedd
@@ -0,0 +1,24 @@
|
||||
import type { Component } from "./component";
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Status
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
export const enum STATUS {
|
||||
NEW,
|
||||
MOUNTED, // is ready, and in DOM. It has a valid el
|
||||
DESTROYED,
|
||||
}
|
||||
|
||||
type STATUS_DESCR = "new" | "mounted" | "destroyed";
|
||||
|
||||
export function status(component: Component): STATUS_DESCR {
|
||||
switch (component.__owl__.status) {
|
||||
case STATUS.NEW:
|
||||
return "new";
|
||||
case STATUS.MOUNTED:
|
||||
return "mounted";
|
||||
case STATUS.DESTROYED:
|
||||
return "destroyed";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user