StellarUI
<stellar-wc-loader>
Loader utility that scans the live document for matching undefined custom elements and imports each component bundle from one shared URL prefix.
Properties
Set the base module URL and the custom-element prefix the loader should scan for.
Live binding
This instance is bound to page signals, ignores itself, and scans the document for matching undefined custom elements.
url-prefix:
wc-prefix:
Use one prefix like stellar or a JSON array string like ["stellar","acme"].
Markup
<stellar-wc-loader
url-prefix="/static/js/stellarui/"
wc-prefix="stellar"
>
</stellar-wc-loader>Install
Drop one loader on the page and let it pull matching component bundles on demand.
<script type="module" src="/static/js/stellarui/wc-loader.js"></script> <stellar-wc-loader hidden uncloak url-prefix="/static/js/stellarui/" wc-prefix="stellar" ></stellar-wc-loader>How it works
- The loader watches the live document for undefined custom elements that match
wc-prefix-*. - For each match, it imports
url-prefix + suffix + ".js", sostellar-buttonresolves tobutton.js. - The loader ignores
stellar-wc-loaderitself to avoid recursive self-import. - Repeated matches share one pending import per URL, so the same module is only requested once.
API
Manifest-driven props, events, and slots for the shipped loader.
| Prop | Type | Default | Notes |
|---|---|---|---|
url-prefix | string | '' | |
wc-prefix | string | '' | |
uncloak | boolean | false |