function F() { return function() { return {}; } } var f = new F(); f instanceof F; // returns false
As far as I understand, if I w
function F() { var r = function() { return {}; }; r.__proto__ = this.__proto__; return r; } var f = new F(); f instanceof F; true f(); Object
Only works in the browsers with __proto__
__proto__