- From: Sasha Firsov <notifications@github.com>
- Date: Sun, 15 Dec 2024 19:18:15 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 16 December 2024 03:18:19 UTC
Worth mentioning how [module url with import maps](https://unpkg.com/@epa-wg/custom-element@0.0.32/demo/module-url.html) can be implemented via data layer and special `module-url` CE . In given example it is ` slice` concept.
It would require the concept of `baseUrl` associated with root.
```html
<custom-element>
<template>
<module-url slice="lib-url" src="lib-root/embed-lib.html#embed-relative-hash"></module-url>
<module-url slice="img-url" src="lib-root/Smiley.svg"></module-url>
<if test="//lib-url/@error">
<p>module loading error: <b>{//lib-url/@error} </b></p>
</if>
check the link:
<a href="{//lib-url}"> lib-root/embed-lib.html#embed-relative-hash <img src="{//img-url}" alt=""></a>
<custom-element src="lib-root/embed-lib.html#embed-relative-hash">
failed to load
</custom-element>
</template>
</custom-element>
```
--
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/1059#issuecomment-2544462904
You are receiving this because you are subscribed to this thread.
Message ID: <WICG/webcomponents/issues/1059/2544462904@github.com>
Received on Monday, 16 December 2024 03:18:19 UTC