Skip to content

Instantly share code, notes, and snippets.

@ijt
Created May 22, 2020 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ijt/6f93a70358be08d7dfd38e428ecf4ad6 to your computer and use it in GitHub Desktop.
Save ijt/6f93a70358be08d7dfd38e428ecf4ad6 to your computer and use it in GitHub Desktop.
Minimal HTML page using LitElement
<!doctype html>
<html>
<head></head>
<body>
<my-element></my-element>
<script type="module">
import {LitElement, html} from 'https://unpkg.com/@polymer/lit-element@latest/lit-element.js?module';
class MyElement extends LitElement {
render() {
return html`
<div>Hello from MyElement!</div>
`;
}
}
customElements.define('my-element', MyElement);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment