Is there a method I can overload to handle undefined properties in JavaScript?
<p>I'm looking for a way to handle calls to undefined methods and properties in JavaScript.  </p>

<p>These would be similar to the PHP magic methods __call, __callStatic, __get.</p>

<p>An example of the code using this might be:</p>

<pre><code>var myObject = {};
myObject.__call = function (called, args) {
    alert(called);
    alert(args);
    return(true);
}

myObject.meow("kitty", "miau");
</code></pre>

<p>This would result in the first alert dialog displaying "meow" and the second to display "kitty, miau".</p>
