DEV Community

Discussion on: What's new and upcoming in browser land?

Collapse
 
maxart2501 profile image
Massimo Artizzu • Edited

Oh boy, a lot of stuff is coming! Oh well, I guess it's always a lot of stuff, actually...

JavaScript is evolving

New features get added every year. A couple of days ago the Nullish Coalescing operator had reached stage 3, and a couple of hours ago the Optional chaining proposal did the same!

Now, those proposals need to reach stage 4 to become officially part of the language, but reaching stage 3 means that browsers, Node and TypeScript will start to implement them soon, so they will be de facto usable.

Standard library

As we've seen with the new kv-storage API, browsers will start implement new features not by exposing some new global object, but rather by built-in modules prefixes by std:.

But the most interesting part is about import maps: they instruct the environment how to resolve package names, so that would mean a super nice way to polyfill missing features, loaded just if needed.

Loaders for everything!

We've done it countless times, abusing the language thanks to webpack, but the act of importing a CSS file into JavaScript won't be a mere dream anymore, but a reality!

But first, we'll have JSON and HTML imports; later, we could have custom loaders for everything we need to have as a dependency.

Final thoughts

It's just a couple of things here, but there are really a lot. Many already reported by other comments here: Houdini, Web Assembly, PWAs...

The "sad" part is that most of this innovative force comes from Google and Chrome, forcing Microsoft to give up, leaving Firefox to hobble behind and Safari... well, Safari being the new IE.
It's a still way better situation than, say, 10 years ago but still not optimal.

Collapse
 
zcdunn profile image
Zack Dunn

I've been following the Nullish Coalescing and Optional chaining proposals for a while. It's exciting to see them reach stage 3! Now if only the pipeline proposal could make some progress.