]> piware.de Git - webcomponents.git/blob - cdn.html
Add cdn.html: Single document without any additional local resources
[webcomponents.git] / cdn.html
1 <head>
2     <title>lit-html CDN example</title>
3     <meta charset="utf-8">
4 </head>
5
6 <script type="module">
7 import { LitElement, html } from "https://cdn.pika.dev/lit-element";
8
9 class HelloWorld extends LitElement {
10   render() {
11     return html`<p>Hello world! Came here from ${document.referrer}</p>`;
12   }
13 }
14
15 customElements.define('hello-world', HelloWorld);
16 </script>
17
18 <body>
19
20 <h1>lit-html CDN examples</h1>
21
22 <h3>Hello World</h3>
23 <hello-world />
24
25 </body>