Placeholders enable dynamic text substitution without a server-side build step.
The PlaceholderBinder.scanAndHydrate(root) method initializes detection:
TreeWalker identifies text nodes matching [[ variable : fallback ]].
<cv-placeholder> custom element.href or src).
.cv-bind class or data-cv-bind attribute.data-cv-attr-templates for later interpolation.Updates are driven by the placeholderValueStore:
<cv-placeholder> component subscribes to the store. When a value changes, the component re-renders independently. This ensures O(1) update performance regardless of page size.[data-cv-attr-templates], interpolates the new values, and updates attributes directly. URL attributes (href, src) are automatically encoded.A MutationObserver watches for DOM changes:
<cv-placeholder> to prevent infinite loops.