title: Custom Element Illegal Constructor
body: <p>This code gives an "Illegal Constructor" Error, can anybody tell me why?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>class MyCustomElement extends HTMLElement {
    constructor(){
      super();
      // Other things
    }
  }
  
  const myFunc = () =&gt; {
    const instance = new MyCustomElement();
    console.log(instance);
  }
  
  myFunc();</code></pre>
  </div>
  </div>
  </p>