Why this window.opener.reload is not a function error?

javascript

Solution

`reload` is a method of the `location` object, not the `window` object.

window.opener.location.reload();

Problem

I have a snippet like this. ``` if (window.opener != null) { window.opener.reload(); } ``` When called, firebug shows, TypeError: window.opener.reload is not a function And Chrome console says, Uncaught TypeError: Object [object global] has no method 'reload' What could be wrong? P.S: `typeof window.opener` is `"object"`.

Original source