In FF and Chrome, I can set this value for a location object using bind, with the following code
locationFacade ={ reload: location.reload.bind(location) } locationFacade.reload();
Or I can use apply
locationFacade ={ reload: function(){ location.reload.apply(location,arguments); } } locationFacade.reload();
However, in IE 9, I keep getting "Invalid caller" when calling locationFacade.reload (); I have not tested every IE, but the problem also occurs in IE 11. Apply and bind are supported in IE here and here.
source share