API Reference
Welcome to the Lego API documentation.
Core
- Lego.init() - initializing the app
- Lego.block() - Defining blocks
- Lego.route() - Client-side routing
- Lego.globals - Global state
- Lego.config - Configuration & Error Handling
- Lifecycle Hooks - Block lifecycle methods
Advanced
- Lego.snap() & Lego.unsnap() - Manual block initialization and cleanup
Templates & Binding
- Directives -
b-show,b-for,b-sync
Browser Support
Lego requires:
- Web Components (Custom Elements v1)
- Shadow DOM v1
- ES6 Proxy
- Template Literals
- MutationObserver
Supported browsers:
- Chrome 63+
- Firefox 63+
- Safari 11.1+
- Edge 79+