| @ciolabs/html-mod | minor |
|---|
Add experimental auto-flush implementation that eliminates manual flush() calls
- Import path:
@ciolabs/html-mod/experimental - Automatically synchronizes AST after every modification
- No manual
flush()calls required - Element references stay valid across modifications
- 2.16x faster for modify+query patterns (most common in visual editors)
- Added
datasetproperty toHtmlModElement - Full Proxy-based implementation with camelCase ↔ kebab-case conversion
- Compatible with standard DOM
DOMStringMapinterface - Supports all dataset operations: get, set, delete, enumerate
Benchmarks (vs stable version):
- Parse + setAttribute: 1.19x faster
- Modify + query pattern: 2.16x faster
- Real-world templates: 1.29x faster
- Batched modifications: 3.07x slower (rare pattern)
- See
EXPERIMENTAL.mdfor complete feature comparison - Migration guide included for switching from stable to experimental
- Comprehensive deployment recommendations
- 624 tests passing (vs 196 in stable)
- Includes adversarial testing, stress testing, and real-world scenarios
- Zero drift over 10,000+ consecutive operations
- Handles malformed HTML gracefully
None - fully backward compatible. The experimental version is available at a separate import path (/experimental).