News for hackers. Stuff that matters.
Re:Web Components Are Okay by candiddevmike on Sunday September 29, 2024 @08:53AM (#41687022)
The only way to get out of the current front end hell IMO is if we get client side import:

https://github.com/whatwg/html/issues/2791

Re:Web Components Are Okay by arcbyte on Sunday September 29, 2024 @09:27AM (#41687250)
I'm aghast at the comments in that thread. They are truly asleep at the wheel.

No wonder the front end is such a disaster with those mindsets running the show.

Re:Web Components Are Okay by lelanthran on Monday September 30, 2024 @12:21PM (#41698940)
> I'm aghast at the comments in that thread. They are truly asleep at the wheel.

And the wheel that they're at is the one in a clown car. Which is driving off a cliff.

Just having a custom element `<my-include-html remote-src='...'>`[1] is enough to forgo 50% of the reason for using a front-end framework with a build-step.

[1] One that executes scripts, allows `<style>` tags, etc.

Re:Web Components Are Okay by askonomm on Sunday September 29, 2024 @09:02AM (#41687078)
I mean <script type="module"></script> can do ECMAScript module imports.
Re:Web Components Are Okay by meiraleal on Sunday September 29, 2024 @09:17AM (#41687181)
That's a solved problem. You can create a custom element for that with some 5 lines of code. Or use one ready: https://github.com/justinfagnani/html-include-element
Re:Web Components Are Okay by PaulHoule on Sunday September 29, 2024 @09:40AM (#41687343)
And that’s exactly what some people don’t want!
Re:Web Components Are Okay by meiraleal on Sunday September 29, 2024 @10:02AM (#41687482)
Some people will never be happy
Re:Web Components Are Okay by halfcat on Sunday September 29, 2024 @09:02PM (#41692379)
Would this be different from using HTMX to load an HTML partial on page load?

Something like:

  <div hx-trigger="load" hx-get="/header.html"></div>