fix(loader): rename window parameter

fix(loader): rename window parameter

The parameter name of `window` causes problems with 
code coverage tools.

Closes #3449