Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Extending HTMLElement as Select

Public visualization

Viewing a saved revision (read-only)

5137f75bd6d2449799e1d4078b94f529

Extending HTMLElement as Select

0 stars0🌍 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 description

An example including some commonly used features of SVG.