The following script will throw a TypeError ('undefined' is not a valid argument for 'instanceof' (evaluating 'window.location instanceof window.Location')) because window.Location is undefined <script> if (window.location instanceof window.Location) { console.log('ok'); } </script> Other browsers I tested (Chrome 30.0/FireFox 24.0) do not have this issue.
Minimal test case: data:text/html,<script>var%20result%20=%20'FAIL';%20try%20{%20if%20(window.location%20instanceof%20window.Location)%20{%20result%20=%20'PASS';%20}%20}%20catch(e)%20{}%20document.write(result);</script> FWIW, I get PASS on WebKit nightly r158804.
> Minimal test case: > > data:text/html,<script>var%20result%20=%20'FAIL';%20try%20{%20if%20(window.location%20instanceof%20window.Location)%20{%20result%20=%20'PASS';%20}%20}%20catch(e)%20{}%20document.write(result);</script> > > FWIW, I get PASS on WebKit nightly r158804. This returns FAIL on Safari 6.0.5 (8536.30.1), Mac OS X 10.8.5 and Safari 6.0 (8536.25), iOS 6.1.3
window.Location has been supported for a long time. There might have been some issue with instanceof, but Safari 6.0.5 is ancient history, and so is iOS 6. This test works as expected in Safari 7.