🌐
Videos Blog About Series πŸ—ΊοΈ
❓
πŸ”‘

Web components: taken to the bikeshed πŸ”—
1708990756  

🏷️ blog 🏷️ javascript 🏷️ www
Web Components are a matter of particular amusement given many are coming back to the realization that the best way to build modular websites is via server-side templating for a variety of good reasons. This bad idea then becomes worse via shadow DOM reliance and randomizing the CSS classnames & IDs to prevent collisions when having multiple instances of the same component on a page. This pretty much screws testers who need reliable selectors; Shadow DOM means that XPath is right out, and randomized classnames & IDs means CSS selectors are likely shot too. Playwright solved this via the nuclear option of ripping the selector out of the browser's internals. Even then they can only be tested in isolation rather than in situ.

Verdict: avoid. Server side template includes are the better tool to reach for.
25 most recent posts older than 1708990756
Size:
Jump to:
POTZREBIE
© 2020-2023 Troglodyne LLC