TheBird

main.tsx

516 B · tsx · 17 lines

1import { start } from "./mode.ts";2import { load } from "./lazy.ts";3import "./warp.ts";4import "./bird.ts";5import "./sky.ts";67start();89const host = document.getElementById("app");10const box = document.getElementById("props");1112if (host && box) {13  const view = JSON.parse(box.textContent ?? "{}");14  const body = document.querySelector("[data-body]");15  if (body) view.page.props.body = body.innerHTML;16  void Promise.all([import("./mount.tsx"), load(view.page?.kind)]).then(([one]) => one.mount(host, view));17}