Experiment 01 · Worker instantiation · Classic script

Uses a classic script>, that simply acknowledges messages it receives, logging them on the console. Classic script instantiated with:

const worker = new Worker( "worker.js");
worker.postMessage( { op: "sip", args: [ "☕️" ] });
worker.postMessage( { op: "crunch", args: [ "🍐", "🍪" ] });
worker.postMessage( { op: "listen", args: [ "Miles Ahead / Gone 2015" ] });
worker.postMessage( { op: undefined });

Open the Console (CMD-ALT-J), which should display an output similar to this one:

Supported by Safari 12 and Firefox 64 and Chrome 71 out-of-the box.