Delegate Javascript Functions
<p>As an siginificantly simplified scenario, say I have 2 Javascript objects defined as below:</p>

<pre><code>var ClassA = Class.extend({
    'say': function(message) {
        console.log(message);
    }

    ... // some more methods ...
});

var ClassB = Class.extend({
    init: function(obj) {
        this._target = obj;
    }
});
</code></pre>

<p>I'd suppose that in Javascript there is some kind of mechanism could enable us to do the following trick:</p>

<pre><code>var b = new ClassB( new ClassA() );
b.say("hello");
</code></pre>

<p>I'd like to find a way to detect if there is a method called upon <code>ClassB</code>, and the method is not defined in <code>ClassB</code>, then I can automatically forward the method call to be upon <code>ClassA</code>, which is a member variable in <code>ClassB</code>.</p>

<p>In a realworld scenario, <code>ClassA</code> is an object implemented as brwoser plugin and inserted into the webpage using <code>&lt;object&gt;</code> tag. It's method is implemented in C++ code so there is no way I can tell its methods from its prototype and insert it to <code>ClassB</code>'s prototype beforehand.</p>

<p>I'd like to use the technical to create a native Javascript object, with a narraw-ed version of ClassA's interface. Is there a way I can do this?</p>
