My browser displays JavaScript code in the web page instead of the expected output from my custom element. The web page shows:
[object Object]
The code for the custom element is simple:
import { LitElement } from 'https://jspm.dev/lit-element@2.3.1';
import { html } from 'https://jspm.dev/lit-html@1.2.1';
export class MyFooter extends LitElement {
createRenderRoot() {
return this;
}
render(){
return html`
foobar
`;
}
}
customElements.define('my-footer', MyFooter);
I am not using Node, NPM, or any build tooling, just importing ES6 modules from the JSPM CDN to load JavaScript.