@maxchang/jsx-dom
TypeScript icon, indicating that this package has built-in type declarations

8.1.6 • Public • Published

@maxchang/jsx-dom

A browser and userscript-friendly repackaging of alex-kinokon/jsx-dom.

What is jsx-dom?

A lightweight wrapper around document.createElement that lets you create DOM elements using JSX syntax, eliminating tedious imperative code. Particularly valuable for userscripts that need to dynamically generate DOM elements.

Features

  • UMD Support: Allows loading directly from a CDN in userscripts via @require.
  • ESM Retained: Keeps the ESM build for benefits like HMR and optional bundling.

Installation

pnpm add @maxchang/jsx-dom
yarn add @maxchang/jsx-dom
npm install @maxchang/jsx-dom

Why Not ...?

  • alex-kinokon's jsx-dom
    • No UMD support, only ESM. Cannot be used in userscripts via @require a CDN.
  • violentmonkey's vm-dom
    • Based on @gera2ld/jsx-dom, which is not actively maintained.
    • Do not have type definitions for jsx-runtime.

License

This project is licensed under the BSD 3-Clause License, the same as jsx-dom.

See LICENSE for details.

Readme

Keywords

none

Package Sidebar

Install

npm i @maxchang/jsx-dom

Weekly Downloads

1

Version

8.1.6

License

none

Unpacked Size

26.1 kB

Total Files

8

Last publish

Collaborators

  • max3917