Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/nperez0111/bookhive. Track your books, share your shelves, see what others are reading bookhive.buzz
atproto bluesky books bookshelf goodreads management-system
Something went wrong. Try again.
TypeScript
12345678910111213141516import { html, raw } from "hono/html";import type { FC } from "hono/jsx";
export const Script: FC<{ script: (document: Document) => void; onDomContentLoaded?: boolean;}> = ({ script: interactivity, onDomContentLoaded = true }) => { /* What a hack to get nice highlighting of interactive JS */ return html`<script type="text/javascript" defer> ${ onDomContentLoaded ? raw`document.addEventListener("DOMContentLoaded", function () {` : "" }(${raw(interactivity.toString())})(document); ${onDomContentLoaded ? `});` : ""}; </script>`;};