[IMP] owl: introduce dev mode

This commit adds a static key 'dev' on QWeb (which acts as a central
point of access in owl internal code), and a 'mode' key on the value
exported by owl to let external code manipulate it.

closes #117
This commit is contained in:
Géry Debongnie
2019-05-21 14:11:40 +02:00
parent 8f29cfc996
commit 1dec8df715
4 changed files with 39 additions and 3 deletions
+3
View File
@@ -127,6 +127,9 @@ export class QWeb {
templates: { [name: string]: Template } = {};
utils = UTILS;
// dev mode enables better error messages or more costly validations
static dev: boolean = false;
// the id field is useful to be able to hash qweb instances. The current
// use case is that component's templates are qweb dependant, and need to be
// able to map a qweb instance to a template name.