This is not ReferenceErrorto create a function that refers to a character that is not unsolvable at the time the function was created. The error is called later when the function is called if at that moment the character is unsolvable.
Consider, for example, that you could do this:
try {
var f;
Object.defineProperty(window, 'a', {
get: function() {
return fxxxxx;
},
set: function(v) {
f = v;
}
});
} catch (e) {
console.log('try...catch OK: ', e);
}
window.fxxxxx = function() { console.log("Hi there"); };
a = function() {
return true;
}
window.a();
Run codeHide resultlogs "Hi there", fxxxxx get.