fix(Generator): Use the window object instead of global
Merge pull request #75 from Eluinhost/fix/window

fix(Generator): Use the window object instead of global