This library implements a standalone DOM subset based on Deno DOM that can be used in deno or in the browser.
UIX DOM also supports DATEX bindings for DOM elements from the UIX DOM library, as well as for normal browser DOM elements.
To get started, import the context from "mod.ts":
import * as context from "../uix-dom/dom/mod.ts";
This context includes definitions for all Elements, as well as a document
object.
It can be used interchangably with the globalThis
object in the browser.
By enabling DATEX bindings for a DOMContext
object,
the corresponding DATEX type definitions are mapped to the DOM context
and reactivity is enabled.
import { enableDatexBindings } from "./datex-bindings/mod.ts";
const domUtils = enableDatexBindings(context);
import { enableJSX } from "./jsx/mod.ts";
const {jsx, jsxs, Fragment} = enableJSX(domUtils, context);