10 Exciting JavaScript Features Coming in 2024

Published On Mon Jul 08 2024
10 Exciting JavaScript Features Coming in 2024

Web Weekly #137 | Stefan Judis Web Development

What are the new 2024 JavaScript features? What's a good fallback strategy for using container queries today? And do we need yet another browser engine? Turn on the Web Weekly tune and find all the answers below. Enjoy!

Carlos listens to Grace Jones — I've Seen That Face Before (Libertango). I met her in the film Frantic, by Roman Polanski, which I really love, and I think they fit together wonderfully to give atmosphere to a fascinating Paris. Do you want to share your favorite song with the Web Weekly community? Hit reply; there are three more songs left in the queue.

Chrome Canary Updates

This week's biggest news was that Chrome Canary now has a built-in LLM (Gemini Nano) accessible via window.ai. Here's the explainer document about shipping LLMs in browsers if you want to learn more about it. Using a local model has some advantages. You're not sending sensible data to Open AI and friends. It works offline. It's probably faster. It's a win-win, right?

Shipping LLMs in Browsers

But embedding LLMs in browsers is risky business. For years, browser makers have been working towards interoperability. New browser features should work the same way in all browsers. And they all align and plan to make it easier for us web developers. Patrick has some very valid concerns about shipping LLMs in browsers. If Google ships its LLM (Gemini Nano) in Chrome and Apple ships another LLM because it has to catch up, what does this mean for us web developers?

Container Queries Fallback Strategy

Not too long ago, Chris wondered if we all actually use container queries after requesting them for so long. They're generally safe to use because all major browsers have supported them for over a year. If you're still afraid of unsupported browsers, Philip from Google took the matter into his own hands and described a fancy fallback strategy.

JavaScript Features and Browser Engines

Short'n'sweet: the next version of JavaScript was agreed upon, and Axel, as always, tells us what we need to know about the new specs. An oldie but goldie, Steven explains why you should avoid booleans in your function signatures. Wowza! Would you enjoy getting Web Weekly straight to your inbox?

Imagine calling Object.keys(obj)👆... What order will all the properties have? If you now say "property order isn't guaranteed in JavaScript" you'll be surprised that it mainly is these days. Find more short web development learnings in my "Today I learned" section.

Color Gradient Updates

There's some news on the color gradient front. All major browser engines now support long color interpolation. What's that? The shorter / longer keywords let you define which path to take.

Security Tips and Tools

Today's tiny helper isn't one but two! Paste your site URL into the "MDN HTTP Observatory" or "Security Headers" and discover how to strengthen its security. If your site doesn't ship CSP, you should check it out.

If you enjoyed this email or have suggestions for improvement, reply to this email because I want to know more. And with that, take care of yourself - mentally, physically, and emotionally. I'll see you next week! 👋