code show as below
var f = function(call,args){
call(args);
}
When executing f(console.log,123)
, there is no problem.
But when executing f(loaction.reload,true)
, an error is reported.
Error message As followsUncaught TypeError: Illegal invocation
Explain that the reload method cannot be executed without the location object.
for instance: