Skip to content

DOM Implementation for UIX, running in the browser and in deno, supports DATEX bindings

Notifications You must be signed in to change notification settings

unyt-org/uix-dom

Repository files navigation

UIX DOM

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.

Example 1

Loading the DOM Context

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.

Enabling DATEX bindings

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);

Enabling JSX

import { enableJSX } from "./jsx/mod.ts";
const {jsx, jsxs, Fragment} = enableJSX(domUtils, context);

About

DOM Implementation for UIX, running in the browser and in deno, supports DATEX bindings

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published