This project uses CrootJS — vanilla ES6+ JavaScript modules imported straight from jsDelivr, no npm, no bundler. Follow these rules whenever you write, edit, or generate code in this project.
<style> blocks. CSS goes in its own .css file, linked with <link rel="stylesheet" href="...">.<script> blocks with logic. JS goes in its own .js file.style="..." attributes. Use a class defined in the CSS file instead.onclick, onchange, oninput, etc). Attach listeners in JS with addEventListener, or with CrootJS’s own helpers (onClick, onChange, onInput from element.js).<script type="module" src="script.js"></script> — never a plain classic script with inline logic.Exception: a third-party library’s own CDN <script src="..."> tag (e.g. Lucide, SweetAlert2) is fine — that’s an external dependency, not inline application code.
https://cdn.jsdelivr.net/gh/crootjs/lib@<version>/<module>.js. Never @latest in committed code.cookie.js, api.js), not the whole library..min.js variant instead of .js — jsDelivr auto-minifies any file on request (via Terser), even though no .min.js is committed to this repo: https://cdn.jsdelivr.net/gh/crootjs/lib@<version>/cookie.min.js. Use the unminified .js only when actively reading/debugging the source.api.js callback functions are NOT (url, ..., responseFunction) uniformly — check the exact parameter position per function (getJSON(url, responseFunction, tokenkey?, tokenvalue?) vs postJSON(url, data, responseFunction, tokenkey?, tokenvalue?)) before writing a call.websocket.js’s openWebSocketSetId is Promise-based (asynchronous) — it does not return a WebSocket synchronously.