API Documentation with Specs
Guarded-CikDypOM
index
JSX.shared
Happy-dom.spec.ts
inflator
WebInflator
Tests
- should inflate basic JSX element
- should bind State to JSX attributes and update on change
- should bind event handlers
Conditional Rendering (mounted)
Tests
jsx-types
JSX type tests (with actual JSX)
Tests
- valid intrinsic props
- invalid intrinsic prop (should error)
- event handler typing
- State-backed prop typing
- custom component props
- nested children typing
- conditional children typing
- fragment typing
life.spec.ts
Life Class
Tests
- should execute a scoped function when alive
- should not execute a scoped function when not alive
- should trigger the AbortSignal on exit
Life Class > when()
Tests
Life Class > adopt()
Tests
Life Class > scoped() with cleanup
Tests
- should execute the returned cleanup function on exit
- should not call cleanup function if life never exits
- should handle multiple scoped cleanups correctly
view-transitions.spec.ts
View transitions
Tests
- keeps previous view until transition resolves
- binds document context for startViewTransition
- runs transition handlers sequentially
WebInflator
WebInflator
Tests
- inflates primitives to Text nodes
- inflates intrinsic JSX elements
- inflates fragments and arrays
- inflates iterable
- inflates observable
- inflates observable iterable
- inflates iterable+observable
- inflates observable jsx
- throws on async iterable input
- inflates async iterable component
- inflates sync/async components
- gracefully shuts down on error in component
- inflates nested components deeply
- creates SVGUse with href
- binds multiple event listener sources from arrays
- binds data-, aria-, and boolean attributes
- binds observable style string and reacts to changes
- binds observable style object property and reacts to changes
- attaches multiple event listeners and preserves native behavior
- guarded mount/unmount toggles DOM presence and handles rapid toggles
- applies custom jsxAttributes overrides (as element object property)
- inflates custom element
- caches inflate result for same jsx
WebInflatorAdapter.spec.ts
InflatorAdapter
Tests
WebInflatorBinding
WebInflator.subscribe
Tests
- immediately invokes callback with primitive value
- does nothing for null or undefined
- does something to any object
- calls callback with initial value from observable with get
- subscribes and calls callback on updates
- supports objects with subscribe only
- allows unknown object types with no get/subscribe
Subscribing Property+Attribute
Tests
- binds textContent to State
- binds boolean property and updates accordingly
- binds className from State
- removes attribute when value is null or undefined