v2.0.3

pardnchiu/RenderJS

Last updated

NoteThis README was generated by SKILL, get the ZH version from here.

WarningArchived on 2026-10-30. RenderJS is no longer maintained. The final release is v2.0.3; npm i @pardnchiu/renderjs and the jsDelivr build remain available, but no new features, bug fixes, or security updates will be published, and issues and pull requests are no longer accepted.



EXTEND NATIVE JS PROTOTYPES, RENDER WITHOUT THE OVERHEAD


npmDownloadsLicense




A JavaScript library with chainable DOM construction, a one-shot template engine, and native prototype extensions

Table of Contents



Features


npm i @pardnchiu/renderjs · Documentation

  • Chainable DOM Construction — Build real DOM elements straight from tag-selector strings instead of verbose createElement chains.
  • One-Shot Template Engine — Declarative directives render into the DOM in a single pass, with no virtual-DOM diffing or reactive watching, so you decide exactly when the view updates.
  • Native Prototype Extensions — Dozens of chainable methods on String, Array, Object, Element, URL, and window cover element queries, requests, query strings, and cookies.
  • Built-in Lazyload and SVG Inlining — One call enables IntersectionObserver-driven image lazy loading and automatic inlining of external SVG files.
  • Zero-Dependency Single File — One minified file runs directly in the browser, installed via npm or a CDN script tag.

Architecture


Full Architecture

graph TB
    S["script copyright attribute"] --> G[Init Gate]
    T[HTML Template] --> R[RJS Core]
    G --> R
    R --> D[Directive Parser]
    D --> O[Rendered DOM]
    P[Prototype Extensions] -.-> O
    L[Lazyload / SVG Listener] -.-> O
  1. graph TB
  2. S["script copyright attribute"] --> G[Init Gate]
  3. T[HTML Template] --> R[RJS Core]
  4. G --> R
  5. R --> D[Directive Parser]
  6. D --> O[Rendered DOM]
  7. P[Prototype Extensions] -.-> O
  8. L[Lazyload / SVG Listener] -.-> O

License


This project is licensed under the MIT LICENSE.

Author


Just open an issue to share an idea.
renderjs contributors


©️ 2022 邱敬幃 Pardn Chiu
中文