mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
basic qweb vdom implementation
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { Env } from "../../src/core/widget";
|
||||
import QWeb from "../../src/core/qweb";
|
||||
import QWeb from "../../src/core/qweb_vdom";
|
||||
|
||||
const qweb = new QWeb();
|
||||
|
||||
|
||||
+19
-8
@@ -1,11 +1,22 @@
|
||||
///<amd-module name="main" />
|
||||
|
||||
import RootWidget from "./RootWidget";
|
||||
import env from "./env";
|
||||
import QWeb from "../../src/core/qweb_vdom";
|
||||
import {init} from "../../src/libs/snabbdom/src/snabbdom"
|
||||
import h from "../../src/libs/snabbdom/src/h"
|
||||
import sdProps from "../../src/libs/snabbdom/src/modules/props"
|
||||
import sdListeners from "../../src/libs/snabbdom/src/modules/eventlisteners"
|
||||
|
||||
document.addEventListener("DOMContentLoaded", async function() {
|
||||
const rootWidget = new RootWidget(null);
|
||||
rootWidget.setEnvironment(env);
|
||||
const mainDiv = document.getElementById("app")!;
|
||||
await rootWidget.mount(mainDiv);
|
||||
});
|
||||
const patch = init([sdProps, sdListeners]);
|
||||
|
||||
(<any>window).h = h;
|
||||
(<any>window).patch = patch;
|
||||
(<any>window).QWeb = QWeb;
|
||||
// import RootWidget from "./RootWidget";
|
||||
// import env from "./env";
|
||||
|
||||
// document.addEventListener("DOMContentLoaded", async function() {
|
||||
// const rootWidget = new RootWidget(null);
|
||||
// rootWidget.setEnvironment(env);
|
||||
// const mainDiv = document.getElementById("app")!;
|
||||
// await rootWidget.mount(mainDiv);
|
||||
// });
|
||||
|
||||
Reference in New Issue
Block a user