DEV Community


Discussion on: How to make a tab control with Web Components

ndesmic profile image
ndesmic Author

Ah, sorry, private fields are still behind a flag in Firefox, I'm not sure about Safari (don't have access to mac) but MDN indicates probably not either. Some simple solutions you can use if you need to extend support:

  • If you want to keep the purity of no-build, replace the # on the private fields with _. Strictly enforcing the privacy of the fields isn't important here so we can use public ones instead as long as the names don't conflict with the setters.
  • You can use a transpiler.