8.1.6 • Published 6 months ago

@maxchang/jsx-dom v8.1.6

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago

@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.

8.1.6

6 months ago