re: Web Components Fundamentals, Part 2/3 VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Can web components be defined using factory functions instead of classes?
 

I have to say I’ve never tried, but I read somewhere that yes it’s possible! Javascript classes are, after all, just syntaxic sugar over the existing prototype model, so if you can define prototypes using a factory function, you can probably add the HTMLElement prototype to your outputted object

 
code of conduct - report abuse