DavideCarvalho
10/15/2018 - 11:38 AM

Hello World Component with Web Components #web_components

Hello World Component with Web Components #web_components

class HelloWorldComponent extends HTMLElemenent {
  
  constructor() {
    super();
  }
  
  connectedCallback() {
    this.innerHtml = `
      <p>Hello World</p>
    `;
  }
}

customElemements.define('hello-world', HelloWorldComponent);