This page walks you through a complete working example using all four WyvernJS modules in a browser environment. By the end, you will have a page that renders a UI with TianFeng’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/michael-tiger-2010/wyvernjs/llms.txt
Use this file to discover all available pages before exploring further.
tree(), manipulates DOM elements with DiWu’s chainable methods, runs an async test suite with FireWyrm, and captures a performance benchmark with ShuiHu — all with zero dependencies and no build step.
Add WyvernJS to your page
The fastest way to get started is a single CDN script tag that loads all four modules at once. Add it to the This registers
<head> or just before the closing </body> tag of your HTML file:dw, tf, fw, sh (and their long-form aliases) as globals on window. No bundler, no npm install, no further configuration needed.Initialize the modules
DiWu and TianFeng must be initialized before their features are available. Add the following in your own FireWyrm (
<script> block, after the WyvernJS script tag:fw) and ShuiHu (sh) require no init call — they are ready to use immediately.Manipulate the DOM with DiWu
After
dw.init(), every DOM element gains chainable methods and Proxy-based property accessors. Here is a taste of what is now available on any element:Build UI with TianFeng tree()
After
tf.init(), tree() and body are available on window. tree() is a JSX-like array syntax that creates real DOM nodes without any transpiler:tree() returns an array of the top-level DOM nodes it created. [0] grabs the first (and only) root element, which is then appended directly to body.Write tests with FireWyrm
FireWyrm (Results are printed to the console with ✅/❌ per test and a summary per section.
fw) runs tests asynchronously in a sequential queue. Start a suite with fw.start(), group tests into sections, assert values with chainable matchers, and close with fw.end():Log and benchmark with ShuiHu
ShuiHu (The
sh) provides structured logging with four severity levels and a step-based benchmark timer built on performance.now():sh.time proxy accepts any label — sh.time.myFunction.start(), sh.time.apiCall.start(), etc. Each benchmark is tracked independently and removed from memory on .stop() or .cancel().Next Steps
DiWu Overview
Deep-dive into every DOM method, event helper, animation, and Proxy property that DiWu adds.
TianFeng Overview
Explore the full TianFeng toolkit: routing, stores, fetch helpers, device detection, and more.