From 1f60bc79c55af87a8e19aa7d830bd252a9ea6338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Sun, 5 Mar 2023 07:48:07 +0100 Subject: [PATCH] [IMP] app: add name as a config option Useful for tooling purpose closes #1342 --- src/runtime/app.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/runtime/app.ts b/src/runtime/app.ts index e1bce3a5..aecfbc4e 100644 --- a/src/runtime/app.ts +++ b/src/runtime/app.ts @@ -14,6 +14,7 @@ export interface Env { } export interface AppConfig extends TemplateSetConfig { + name?: string; props?: P; env?: E; test?: boolean; @@ -54,6 +55,7 @@ export class App< > extends TemplateSet { static validateTarget = validateTarget; + name: string; Root: ComponentConstructor; props: P; env: E; @@ -63,6 +65,7 @@ export class App< constructor(Root: ComponentConstructor, config: AppConfig = {}) { super(config); + this.name = config.name || ""; this.Root = Root; window.__OWL_DEVTOOLS__.apps.add(this); if (config.test) {