DedicatedWorker linker produces output that depends on window object

Hello, I'm trying to run a GWT module as a web worker. Your project seems to be perfect for my needs :)

I followed the instructions but the resulting JS file throws an error when it's imported as a web worker, because it uses the window object.

My WIP code is here: https://github.com/EduMIPS64/edumips64/pull/368/files

Here is the error:

Uncaught ReferenceError: window is not defined
at qc (09702D3F137824C88388D079E9E92E0B.cache.js:1003)
at pc (09702D3F137824C88388D079E9E92E0B.cache.js:428)
at ub (09702D3F137824C88388D079E9E92E0B.cache.js:72)
at Wm (09702D3F137824C88388D079E9E92E0B.cache.js:632)
at Array.Mm (09702D3F137824C88388D079E9E92E0B.cache.js:300)
at g (09702D3F137824C88388D079E9E92E0B.cache.js:909)
at kc (09702D3F137824C88388D079E9E92E0B.cache.js:347)
at nc (09702D3F137824C88388D079E9E92E0B.cache.js:945)
at 09702D3F137824C88388D079E9E92E0B.cache.js:650
at Cm (09702D3F137824C88388D079E9E92E0B.cache.js:910)
at edumips64 (edumips64.nocache.js:1)
at edumips64.nocache.js:2

I've attached:

I would greatly appreciate your help in understanding why I am not using correctly your project.

Thanks in advance!