mastodontech.de ist einer von vielen unabhängigen Mastodon-Servern, mit dem du dich im Fediverse beteiligen kannst.
Offen für alle (über 16) und bereitgestellt von Markus'Blog

Serverstatistik:

1,5 Tsd.
aktive Profile

#webcomponents

4 Beiträge4 Beteiligte0 Beiträge heute

I also have a silly web components question...

If I choose a helper library like #LitHtml and make some component. Say like a button. And I want to make it portable to different projects / contexts.

Is it possible with some tool to "compile" it back to a vanilla web-component again? Or would it only be "portable" to some other context if you also handed over the dependency on Lit?

#html#css#javascript

The Invoker Commands API is the new hotness for a declarative #HTML solution to the problem “click and see something happen!!”

However…

If we’re inside shadow DOM and the button being clicked is supposed to do a thing via its host component, then uh, nope. 🤨

Thankfully there’s always a workaround in the Wide World of the Web, so I’ve written it up and here it is!

😁 Yay for building directly on top of platform mechanics. 👏 #JavaScript #WebComponents #WebDev

thathtml.blog/2025/07/more-fun

That HTML Blog · More Fun with Invoker Commands and Web Components
Mehr von Jared White (🏳️‍⚧️ ally)

Received some feedback from a team using the Custom Element library for an Enterprise Design System I've been working on. Some cross-component lifecycle adjustments were necessary to enhance React compatibility. The nice part was that they also mentioned their (React 19) application was much faster with custom elements, both perceptually and measurably (using Lighthouse).

After a long while tinkering with smaller and smaller ways to build re-usable pieces of HTML, I've landed on something that is simple, and uses the browsers built-in abilities to upgrade elements.

Introducing "ShadowRoot Injector" 🎉
github.com/Tram-One/shadowroot

ShadowRoot Injector is a way to declaratively define HTML, that will automatically insert when custom elements appear in the DOM. 🪡

Check out the link and examples, and let me know what y'all think!
#WebComponents #HTML #ShadowDOM #WebDev

GitHubGitHub - Tram-One/shadowroot-injector: 🪡 declaratively define shadowroots to repeat in HTML templates🪡 declaratively define shadowroots to repeat in HTML templates - Tram-One/shadowroot-injector