[IMP] owl: mount util now takes an AppConfig

This commit is contained in:
Bruno Boi
2021-11-15 14:49:34 +01:00
committed by Aaron Bohy
parent 3fa1bb62f6
commit 717fd3b6ab
2 changed files with 6 additions and 4 deletions
+4 -2
View File
@@ -31,6 +31,7 @@ export const blockDom = {
html,
};
import type { AppConfig } from "./app/app";
import { App } from "./app/app";
import { Component } from "./component/component";
import { getCurrent } from "./component/component_node";
@@ -39,10 +40,11 @@ export { App, Component };
export async function mount<T extends typeof Component>(
C: T,
target: HTMLElement
target: HTMLElement,
config: AppConfig = {}
): Promise<InstanceType<T>> {
const app = new App(C);
return app.mount(target);
return app.configure(config).mount(target);
}
export function useComponent(): Component {