<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://polygit.org/webcomponentsjs/components/webcomponentsjs/webcomponents-loader.js"></script>
<script type="module" src="custom-element.js"></script>
</head>
<body></body>
<custom-element></custom-element>
</body>
</html>
import {Element as PolymerElement} from "https://unpkg.com/@polymer/polymer@3.0.0-pre.1/polymer-element.js"
// Define the class for a new element called custom-element
class CustomElement extends PolymerElement {
static get properties () {
return {
prop1: {
type: String,
value: "Hi"
}
};
}
static get template() {
return `
<style>
</style>
[[prop1]]
`
}
}
// Register the new element with the browser
customElements.define('custom-element', CustomElement);