prototype - Javascript catch protoype calls -


is there way in javascript catch every call on object's prototype?

so if there object, , calls something.somefunction() somefunction not exists can return false.

this possible using proxy, need cross-browser solution. using delegate function first parameter function name, second function parameter not good.

example:

var = (function() {     var = function () {};      prototype = {         'test': function() {}     };      return new something(); })();  something.somefunction(); // false 


Comments