Right, perhaps we can fix it. I think the best way here when in a web worker may be to just run importScripts which (synchronously) loads a list of scripts so that `document` isn't referenced at all.