Skip to content
Snippets Groups Projects
Commit e75b62e8 authored by Midhun Suresh's avatar Midhun Suresh
Browse files

Add class programatically

parent 21c9d9d4
No related branches found
No related tags found
No related merge requests found
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
<link rel="icon" type="image/svg+xml" href="favicon.svg" /> <link rel="icon" type="image/svg+xml" href="favicon.svg" />
<link rel="stylesheet" href="src/style.css"> <link rel="stylesheet" href="src/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title> <title>Chatterbox</title>
</head> </head>
<body> <body>
<div id="chatterbox" class="hydrogen" data-config-link="./config.json"></div> <div id="chatterbox" data-config-link="./config.json"></div>
<script type="module" src="/src/main.ts"></script> <script type="module" src="/src/main.ts"></script>
</body> </body>
</html> </html>
...@@ -20,6 +20,7 @@ async function main() { ...@@ -20,6 +20,7 @@ async function main() {
if (!root) { if (!root) {
throw new Error("No element with id as 'chatterbox' found!"); throw new Error("No element with id as 'chatterbox' found!");
} }
root.className = "hydrogen";
const config = await fetchConfig(root); const config = await fetchConfig(root);
const platform = new Platform(root, assetPaths, {}, { development: import.meta.env.DEV }); const platform = new Platform(root, assetPaths, {}, { development: import.meta.env.DEV });
const navigation = createNavigation(); const navigation = createNavigation();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment