- From: Code Hangen <notifications@github.com>
- Date: Mon, 26 Sep 2022 04:51:07 -0700
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <WICG/webcomponents/issues/971@github.com>
Hi all.
I would like to know if there would be a possibility to create a link rel="import" href= without .html in web component
#### before_example.html
```html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Cdn and web components</title>
<!-- Imports polyfill with cdn external -->
<script src="https://cdnjs1.com/ajax/libs/webcomponents/webcomponents-lite.min.js"></script>
<!-- Imports custom element with cdn external -->
<link rel="import" href="https://cdnjs1.com/ajax/libs/webcomponents/hello-world.html">
</head>
<body>
<!-- Runs custom element from cdn1, cdn2 -->
<hello-world who="Unicorn"></hello-world>
</body>
</html>
```
#### after_example.html
```html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Cdn and web components</title>
<!-- Imports polyfill with cdn external -->
<script src="https://cdnjs1.com/ajax/libs/webcomponents/webcomponents-lite.min.js"></script>
<!-- Imports custom element with cdn external without .html -->
<link rel="import" href="https://cdnjs1.com/ajax/libs/webcomponents/hello-world">
</head>
<body>
<!-- Runs custom element from cdn1, cdn2 -->
<hello-world who="Unicorn"></hello-world>
</body>
</html>
```
#### why?
there are cdn's that don't allow to have .html files in the web component as [cdnjs](https://api.cdnjs.com/whitelist)
--
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/971
You are receiving this because you are subscribed to this thread.
Message ID: <WICG/webcomponents/issues/971@github.com>
Received on Monday, 26 September 2022 11:51:19 UTC