Status: planned
Target version: v0.21.2
Owner: core package, ui package, test infrastructure
Use OpenWC as an ecosystem compatibility baseline without copying its product shape. LessJS should prove that its components remain ordinary Web Components wherever possible.
- OpenWC testing guide: https://open-wc.org/guides/developing-components/testing/
- OpenWC testing helpers: https://open-wc.org/docs/testing/helpers/
- Custom Elements Manifest schema effort: https://github.com/webcomponents/custom-elements-manifest
packages/ui/src/packages/core/src/dsd-element.tspackages/core/src/cem.tsor equivalent CEM parser code- package manifests
- UI and browser tests
LessJS can be differentiated while still being interoperable. If LessJS components cannot be tested or described with common Web Component tooling, the ecosystem story weakens.
The target is not "be OpenWC". The target is:
- ordinary custom elements;
- clear attributes/properties/events/slots;
- useful Custom Elements Manifest support;
- browser-based tests for component behavior;
- no hidden runtime dependency on LessJS app internals for basic component use.
Audit and harden:
- lifecycle behavior of
DsdElementsubclasses; - attributes and property reflection expectations;
- event names and payload contracts;
- slot behavior;
- CEM parsing and validation;
- UI package component examples.
- Pick three representative components:
- one static component;
- one reactive component;
- one component with events or slots.
- Add compatibility tests that mount them as plain custom elements.
- Validate their CEM metadata where available.
- Verify that test helpers can inspect shadow DOM, events, slots, and attributes.
- Document where LessJS intentionally differs from Lit or OpenWC conventions.
- Add a small compatibility matrix to docs.
The matrix should answer:
| Area | LessJS expectation | Evidence |
|---|---|---|
| Custom element registration | Works through standard customElements.define path |
Test file |
| Shadow DOM | DSD-first server output plus browser shadow root parse | DSD conformance fixture |
| Attributes | Documented and reflected when intentional | CEM and test |
| Properties | Runtime-only objects are not serialized | Template test |
| Events | Event names and detail payloads are typed | Test |
| Slots | Named/default slot behavior is covered | Browser test |
- Avoid inventing a proprietary component metadata format where CEM works.
- Do not force users to adopt LessJS app routing to consume a component.
- Do not claim OpenWC compliance unless tests prove the specific behavior.
- Prefer small compatibility fixtures over broad narrative claims.
- At least three representative components have browser-level compatibility tests.
- CEM validation behavior is documented and tested.
- A compatibility matrix exists in docs.
- LessJS differences from OpenWC/Lit are explicit and evidence-based.
- No public docs imply ecosystem compatibility without a linked test or fixture.
git status --short --branch
deno task fmt:check
deno task lint
deno task typecheck
deno task test
deno task test:e2e
deno task docs:check-strategy
git status --short --branchProceed to SOP-006 when Web Component compatibility is supported by tests and metadata, not only positioning language.