Extending HTMLElement as Select
✓ Published0🌍 Public
WWillimnot
Last edited Apr 22, 2022
Created on Dec 4, 2021
Four chained selection panels demonstrate a custom element hierarchy built by extending HTMLElement. The example defines `vc-select`, `vc-selectcheckbox`, `vc-xselect`, and `vc-xxselect` classes, which are registered via `customElements.define`. Each `vc-select` supports dynamic option management, state saving/restoring, and dependency-based filtering through `vc-options` and `vc-dependencies` attributes. A checkbox toggles visual state, and selection changes propagate up the element chain to toggle borders, showing event-driven composite behavior.
AI-generated descriptionAn example including some commonly used features of SVG.
MIT Licensed