The hx-target attribute in htmx allows you to target a different element for swapping than the one issuing the AJAX request.| htmx.org
#Tapping The Sign| </> htmx - high power tools for html
htmx gives you access to AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypertext htmx is small (~14k min.gz’d), dependency-free, extendable, IE11 compatible & has reduced code base sizes by 67% when compared with react| htmx.org
Separation of concerns is a great principle, but you're drawing the line in the wrong place.| Unplanned Obsolescence
An important aspect of custom elements is encapsulation, because a custom element, by definition, is a piece of reusable functionality: it might be dropped into any web page and be expected to work. So it's important that code running in the page should not be able to accidentally break a custom element by modifying its internal implementation. Shadow DOM enables you to attach a DOM tree to an element, and have the internals of this tree hidden from JavaScript and CSS running in the page.| MDN Web Docs
Last week, Jeremy Keith wrote about what he calls HTML Web Components. Some people treat Web Components like JS library components, where everything is rendered with JavaScript. But Jeremy has a different suggestion… Try not to bring React’s mindset with you… Think about composibility with existing materials. Do you really need to invent an entirely new component from scratch? Or can you use HTML up until it reaches its limit and then enhance the markup?| gomakethings.com
I only recently had a breakthrough about using web components, and now I quite like them. But not the shadow kind.| meyerweb.com