repl.it
@todojs/

example

HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • components
  • loadComponent.js
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Example</title>
    <script src="https://unpkg.com/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
  <script type="module">
    import loadComponent from './loadComponent.js';
    loadComponent('./components/wc-countries.html');
  </script>
</head>
<body>
<wc-countries></wc-countries>
</body>
</html>
result
console
?