DEV Community

Discussion on: Create Reusable Web Components in HTML

Collapse
 
dannyengelman profile image
Danny Engelman

I don't understand this line:
// Always call super first in constructor
Is there a limitation in using JS Classes for Web Components?

Collapse
 
eerk profile image
eerk

It's just because the keyword extends HTMLElement is used. That means you have to call super() as well.