<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/styles/rss-style.xsl"?>

<rss version="2.0"
 xmlns:blogChannel="http://backend.userland.com/blogChannelModule"
>

<channel>
<title>troglodyne.net</title>
<link>http://troglodyne.net//posts/37e318b0-50bc-46bf-869f-e1da3b2e4a17?format=xml</link>
<description>troglodyne.net : /posts/37e318b0-50bc-46bf-869f-e1da3b2e4a17</description>
<language>en</language>
<pubDate>2026-04-21T13:42:42</pubDate>
<lastBuildDate>2026-04-21T13:42:42</lastBuildDate>

<image>
<title>troglodyne.net</title>
<url>/favicon.ico</url>
<link>http://troglodyne.net</link>
<width>32</width>
<height>32</height>
<description>troglodyne.net favicon</description>
</image>
<item>
<title>Web components: taken to the bikeshed</title>
<link>http://troglodyne.net/posts/37e318b0-50bc-46bf-869f-e1da3b2e4a17</link>
<description><![CDATA[<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_components">Web Components</a> are a matter of particular amusement given many are coming back to the realization that the best way to build modular websites is via <a href="https://angular.io/guide/ssr">server-side templating</a> 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 <a href="https://playwright.dev/docs/test-components">ripping the selector out of the browser's internals</a>.  Even then they can only be tested in isolation rather than in situ.
<br /><br />
Verdict: avoid.  Server side template includes are the better tool to reach for.]]></description>
<author>george</author>
<guid isPermaLink="true">http://troglodyne.net/posts/37e318b0-50bc-46bf-869f-e1da3b2e4a17</guid>
<pubDate>2024-02-26T23:39:16</pubDate>
<enclosure type="text/html" url="http://troglodyne.net/posts/37e318b0-50bc-46bf-869f-e1da3b2e4a17" />
</item>
</channel>
</rss>
