COCOON / FRAMEWORK REFERENCE
Cocoon’s kernel is distributed as od-cocoon. Start with the runnable quickstart →
Cocoon framework reference
Cocoon supplies application startup, native components, JavaScript templates, inherited styles, signals, and worker-based computation. The reference is being prepared for /documentation/api.
Links below open Markdown source while the dedicated documentation pages are being built. The Markdown pages are the authoritative authoring drafts. Their baseline is the intended arc-kernel source contract; compatibility explains which runtime has been exercised and what still needs release verification. They are not a promise that every feature is available in the older installation release.
Start with a working example
| Goal | Read |
|---|---|
| Build an application with a component | Application |
| Filter contacts as you type | Watching inputs |
| Connect a product picker and basket summary | Events and signals |
| Write conditional, looping, and asynchronous templates | Template syntax |
| Animate a bouncing ball | World |
| Run computation in workers | Threading |
API by responsibility
| Area | Reference |
|---|---|
| Component declaration, generated tags, options | Component |
| Root ownership, slots, and boundaries | Light DOM and shadow DOM |
| Construction, connection, rendering, cleanup | Lifecycle |
| Template providers, inheritance, caching, explicit rerendering | Templates and rendering |
| Skins, CSS methods, extra sheets, shared application styles | Styling |
| Registration, module imports, import maps | Namespaces and imports |
| Reusable behavior and composition limits | Class composition |
| Native span/button enhancement | Customized built-in elements |
| Immediate queries, waiting, shadow/iframe traversal | Selectors and DOM |
| Boot arguments, defaults, path resolution | Script attributes |
| Fallback sandbox registration | Component autodiscovery |
| Startup completion notifications | Page readiness |
Conventions used throughout
Extend Component or core.ui.HtmlComponent. Configure boot with script attributes. Declare an explicit tag with static tag; otherwise the namespace and class generate the tag. Select shadow rendering with inShadow() and preserve page-owned markup with static inline = true when appropriate.
Data assignment does not schedule a render. watch() observes input/change events rather than arbitrary property assignments. Signals currently replay every retained event; their subscribers must tolerate replay. These distinctions are explained with examples in the linked references.
Project-specific base classes and legacy storage APIs are not part of this public surface.