Run Phaser from a Web Worker

I’m trying to get Phaser to render to a canvas from a web worker. Having tried this exact thing with the standard canvas API I know it’s possible to render to a canvas in this way, but I can’t get Phaser to work.

Based on this change log I thought it would be possible, but I keep getting “window is not defined” errors.

The issue is reproduced in the jsfiddle below:

Any help is appreciated!