'window' object not available inside web workers - use 'this' instead.