News for hackers. Stuff that matters.
Re:Show HN: Chrome v83 enables JavaScript module support for... by tobiu on Thursday June 04, 2020 @09:35AM (#23416338)
Some ideas in general:

The article is about putting a framework & your Apps into a separate thread (calling this one App worker).

Now, with SharedWorkers being fully supported, we can connect multiple main threads to a shared App worker. This way Apps live within the same realm and can directly communicate. They even share the virtual dom, leading to really great possibilities (moving dom nodes from one App to another).

E.g. if you would like to create a multi screen trading App, there is a big potential to speed up things.

On mobile this could also get interesting: imagine a native App with multiple WebViews. Those could as well share code and communicate directly.

Even in case there is just one browser window, the default worker setup (non shared workers) can make an impact.

Re:Show HN: Chrome v83 enables JavaScript module support for... by tobiu on Friday June 05, 2020 @02:51PM (#23432309)
Published v1.2.5 on npm: https://neomjs.github.io/pages/

SharedWorkers examples are online. Dev mode: Chrome v83+ Webpack Dist versions: Chrome & Firefox(!)

Enjoy!

A release announcement will follow soon.

In Chrome: open the example, then open chrome://inspect/#workers

inside another tab to see the SharedWorkers. The webpack based dist version supporting Firefox is really impressive.

In FF, open a new tab and open: about:debugging#/runtime/this-firefox

Re:Show HN: Chrome v83 enables JavaScript module support for... by mhoad on Thursday June 04, 2020 @07:57AM (#23415439)
I recently came across a talk on YouTube from Chrome Dev Summit a couple of years ago that covered a very similar pattern to the one shown here that I would recommend checking out https://www.youtube.com/watch?v=Vg60lf92EkM and I am honestly kind of surprised it isn't more popular.
Re:Show HN: Chrome v83 enables JavaScript module support for... by tobiu on Thursday June 04, 2020 @09:29AM (#23416276)
I did not see this one yet, thanks for sharing! (Watching it now)
Re:Show HN: Chrome v83 enables JavaScript module support for... by mleonard on Thursday June 04, 2020 @09:26AM (#23416247)
Great news. Just waiting for es module support in service workers now!