1 2 3 4 5 6 7 8 9 10
let type = ''; try { importScripts('empty.js'); type = 'classic'; } catch (e) { type = 'module'; } onmessage = e => { e.source.postMessage(type); };