News for hackers. Stuff that matters.
Re:Why does target="_blank" have an underscore in front? by graypegg on Monday February 24, 2025 @09:54AM (#43160259)
Tangential, but I would really like frames to come back for incremental document updates, like LiveView/Hotwire/HTMX. You can just start working like that today with one of those libraries, but it would be so neat to have a common standard for describing an update to a targeted frame.
Re:Why does target="_blank" have an underscore in front? by alabastervlog on Monday February 24, 2025 @10:15AM (#43160466)
HTML has a bunch of good stuff in it that'd replace the need for so much heavy and slow and non-native-feeling javascript if that'd just been improved. Lots of it's now rarely used because it sucks, but there's no good reason it has to suck. It's like whole sections of the spec just got abandoned around 2005, but the need is still there.
Re:Why does target="_blank" have an underscore in front? by tombert on Monday February 24, 2025 @10:28AM (#43160629)
The <blink> tag needs to make a comeback; I'm so tired of having to write my own JavaScript to get annoying flashy text.

In all seriousness, I'm not entirely sure why so many features in HTML are eschewed in favor of a slow JS mess. It doesn't feel like bolting on an entire relatively-slow programming language is going to make your code more organized than a relatively easy to use tag.

Re:Why does target="_blank" have an underscore in front? by alabastervlog on Monday February 24, 2025 @10:57AM (#43161005)
We could have datasource-backed tables and list elements. Built-in. Sorting for most purposes, "for free", and more with simple and light JS hooks for sort functions. Frames that actually work as useful UI elements. "Basic auth" screens that look and function well enough for lots of purposes. Something like "Apple Pay" or other external payment systems but built into the browser, replacing stupid amounts of time spent writing yet another payment form (and usually fucking it up in several ways)

But no.

Re:Why does target="_blank" have an underscore in front? by lelandfe on Monday February 24, 2025 @12:04PM (#43161944)
> I'm so tired of having to write my own JavaScript to get annoying flashy text

Fret no more:

    <style>

        .blink { animation: blink 1s steps(2, start) infinite; }

        @keyframes blink { 50% { visibility: hidden; } }

    </style>

    <p class="blink">Lorem ipsum</p>
https://jsfiddle.net/xrkLt2nz/
Re:Why does target="_blank" have an underscore in front? by tombert on Monday February 24, 2025 @12:19PM (#43162146)
This is certainly better than nothing, but it should just be a tag! I shouldn't need this fancy new-fangled "CSS" fad to bail me out of the problems that W3C created by removing it in the first place!
Re:Why does target="_blank" have an underscore in front? by lelandfe on Monday February 24, 2025 @12:23PM (#43162197)
Definitely. Much less the many several users who yet lack CSS support in their preferred browser.
Re:Why does target="_blank" have an underscore in front? by tombert on Monday February 24, 2025 @12:26PM (#43162232)
The good news is that <marquee> still works in the latest Firefox. No need for any new-fangled animation libraries for me.
Re:Why does target="_blank" have an underscore in front? by Sohcahtoa82 on Monday February 24, 2025 @01:27PM (#43162987)
If front-end devs would stop reinventing things using JS that can be done in CSS, I'd be so happy.
Re:Why does target="_blank" have an underscore in front? by wruza on Monday February 24, 2025 @03:22PM (#43164497)
Why?
Re:Why does target="_blank" have an underscore in front? by thesuitonym on Monday February 24, 2025 @04:41PM (#43165282)
Not the GP, but my two cents: because JS sucks and CSS can already do it.
Re:Why does target="_blank" have an underscore in front? by Sohcahtoa82 on Monday February 24, 2025 @06:59PM (#43166423)
Because the JS version will likely take more resources and probably end up being done wrong anyways.

I just don't get why front-end devs feel the need to reinvent everything.

I mean, for fuck's sake, front-end devs for some reason have a fascination with reinventing fucking SCROLLING. And 100% of the time, it either doesn't work, has less functionality than what was built-in, or is annoying for the simple fact that it changes an expected behavior.

If I click my scroll wheel once, and the page keeps scrolling and the scrolling slowly comes to a stop as if it had momentum, that's a bug, not a feature. Stop wasting time deliberately writing bugs.

Re:Why does target="_blank" have an underscore in front? by wruza on Monday February 24, 2025 @09:59PM (#43167574)
Scrolling is sort of a strawman here, so I’ll focus on blinking and css features and the need to reinvent these.

First, not all css features are consistent enough from the side you usually tend to approach things, due to various backgrounds and thinking modes. Css is notoriously overcomplicated, nuanced and ad-hoc applicable, and tendency to neglect it is its own self-imposed problem.

Second, there’s no law that dictated some true way to do things. People use instruments they know, and if these work, there’s no need to go and find true ways.

Overall, there’s no difference if you do something in js that css can do, apart from hurting someone’s feelings. All the difference you see is in multi-megabyte tracking scripts, not in js-dom chain per se. The difference betwen css and js ways is barely measurable when you start actually testing it. But js is more powerful in expression and familiar to a developer (except for 60fps+ animations and such).

I say this as a non-frontend dev who makes dashboards and other report/control pages for myself, so opinions may vary. But I’ve never seen a higher resource consumption from avoiding css. To my understanding, literally all sites I ever visited can be implemented in a straightforward way in js and will never “take more resources” and will work as fast as just html. Because it’s literally how any non-C GUI app works on desktops. An interpreted jit-able language controlling some widgets. It’s nothing new or unusual or bizarre. In fact, css is also a language, even if declarative, and keyframes structures and other calc()s also get interpreted many times per second, even if not using a full-blown vm.

In my opinion, people’s web bloat ideas are all over the place and miss the basics comletely, e.g. https://news.ycombinator.com/item?id=42990724 , and tend to blame wrong parts.

Re:Why does target="_blank" have an underscore in front? by Sohcahtoa82 on Tuesday February 25, 2025 @07:47PM (#43179379)
> Scrolling is sort of a strawman here

Fair enough.

And good points all around, especially in your linked comment.

Re:Why does target="_blank" have an underscore in front? by earthboundkid on Monday February 24, 2025 @11:43AM (#43161608)
The main problem with frames is that you need to use JS to get it to be responsively sized. If they would fix that, frames would be perfect. They actually do what people just think Web Components do. I.E. they are actually isolated from the styles of the host page and have an actual security boundary preventing malicious execution.
Re:Why does target="_blank" have an underscore in front? by snarkyturtle on Monday February 24, 2025 @10:07AM (#43160366)
Isn't that the use-case for Micro Frontend Architecture? I've always viewed it as a second-coming of Frames. https://micro-frontends.org/
Re:Why does target="_blank" have an underscore in front? by lelandfe on Monday February 24, 2025 @10:29AM (#43160644)
I consider frames to be an example of MFE, actually. I believe I remember reading that Spotify (long ago) used frames in their app so each team could be self-contained.

Edit: In fact, I'm pretty sure Geers' book associated with that site says as much.

Re:Why does target="_blank" have an underscore in front? by jodydonetti on Monday February 24, 2025 @10:32AM (#43160686)
What are you missing by using iframes (still standard, supported, working) + css for layouting that old school frames would give you?
Re:Why does target="_blank" have an underscore in front? by graypegg on Monday February 24, 2025 @11:48AM (#43161677)
The targeting for updates. Something like hotwire/turbo frames allows you to push a form's response to any turbo-frame. You can also push updates to multiple frames at once. They're matched by frame ID, much like target="", but in the case of iframes, the iframe is the only thing that can update the interior HTML. (other than just changing the URL from the parent application)

iframes are also in a rather locked-down security model, even if they exist on the same domain. (Requires message passing, strict CORS rules, strict cookies rules etc)

Re:Why does target="_blank" have an underscore in front? by evantbyrne on Monday February 24, 2025 @11:05AM (#43161108)
I'm just happy we can find DOM elements by CSS selectors now. Full browser support for calc was almost too much excitement for me
Re:Why does target="_blank" have an underscore in front? by jonathanhefner on Monday February 24, 2025 @10:24AM (#43160580)
Agreed! There is a proposal for something like that in the WHATWG repo: https://github.com/whatwg/html/issues/8538
Re:Why does target="_blank" have an underscore in front? by recursivedoubts on Monday February 24, 2025 @04:45PM (#43165316)
Alex and (to a much lesser extent) I are trying to get a modernized version into the HTML spec:

https://github.com/alexpetros/triptych