add webview threaded api
This commit is contained in:
committed by
hsjobeki
parent
3b3426d219
commit
484247de6d
18
pkgs/webview-ui/app/src/index.tsx
Normal file
18
pkgs/webview-ui/app/src/index.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
/* @refresh reload */
|
||||
import { render } from "solid-js/web";
|
||||
|
||||
import "./index.css";
|
||||
import App from "./App";
|
||||
|
||||
const root = document.getElementById("app");
|
||||
|
||||
// @ts-ignore: add the clan scope to the window object so we can register callbacks for gtk
|
||||
window.clan = window.clan || {};
|
||||
|
||||
if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
|
||||
throw new Error(
|
||||
"Root element not found. Did you forget to add it to your index.html? Or maybe the id attribute got misspelled?"
|
||||
);
|
||||
}
|
||||
|
||||
render(() => <App />, root!);
|
||||
Reference in New Issue
Block a user