ref: rename playground => app

also, add version in title
This commit is contained in:
Géry Debongnie
2019-03-29 16:14:36 +01:00
parent c7c0cb7d44
commit b18310db9b
2 changed files with 9 additions and 5 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Odoo Web Lab Playground</title>
<title>OWL Playground</title>
<link rel="icon" href="data:,">
<script src="libs/ace.js" type="text/javascript" charset="utf-8"></script>
@@ -10,7 +10,7 @@
<!-- Application JS/CSS -->
<link rel="stylesheet" href="playground.css">
<script type="module" src="src/playground.js"></script>
<script type="module" src="src/app.js"></script>
</head>
<body>
+7 -3
View File
@@ -43,7 +43,7 @@ const TEMPLATE = `
</div>
</div>`;
class Playground extends Component {
class App extends Component {
constructor(...args) {
super(...args);
this.version = owl._version;
@@ -142,9 +142,13 @@ class Playground extends Component {
}
}
//------------------------------------------------------------------------------
// Application initialization
//------------------------------------------------------------------------------
document.title = `${document.title} (v${owl._version})`;
document.addEventListener("DOMContentLoaded", async function() {
const qweb = new QWeb();
const env = { qweb };
const playground = new Playground(env);
playground.mount(document.body);
const app = new App(env);
app.mount(document.body);
});