API Documentation with Specs
index
Observable-BpkSyM9f
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
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 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