jahcode.js
function(obj) {
                if (!obj.constructor.Bind) {
                    try {
                        var descr = {};
                        Bind.each(obj, function(name, method) {
                            descr[name] = {
                                get : function() {
                                    return this[name] = method.bind(this.self);
                                },
                                set : function(val) {
                                    Object.defineProperty(this, name, {
                                        value : val
                                    });
                                },
                                configurable : true
                            };
                        });
                        obj.constructor.Bind = Bind.Object.inherit(descr);
                    } catch (e) {
                        obj.constructor.Bind = Bind.Object.inherit({});
                    }
                }

                return new obj.constructor.Bind(obj);
            }
function(obj) {
                if (!obj.constructor.Bind) {
                    try {
                        var descr = {};
                        Bind.each(obj, function(name, method) {
                            descr[name] = {
                                get : function() {
                                    return this[name] = method.bind(this.self);
                                },
                                set : function(val) {
                                    Object.defineProperty(this, name, {
                                        value : val
                                    });
                                },
                                configurable : true
                            };
                        });
                        obj.constructor.Bind = Bind.Object.inherit(descr);
                    } catch (e) {
                        obj.constructor.Bind = Bind.Object.inherit({});
                    }
                }

                return new obj.constructor.Bind(obj);
            }
function ( obj ) { if ( ! obj . constructor . Bind ) { try { var descr = { } ; Bind . each ( obj , function ( name , method ) { descr [ name ] = { get : function ( ) { return this [ name ] = method . bind ( this . self ) ; } , set : function ( val ) { Object . defineProperty ( this , name , { value : val } ) ; } , configurable : true } ; } ) ; obj . constructor . Bind = Bind . Object . inherit ( descr ) ; } catch ( e ) { obj . constructor . Bind = Bind . Object . inherit ( { } ) ; } } return new obj . constructor . Bind ( obj ) ; }
Creates a bind proxy for the given object
Each method of the given object is reflected on the proxy and
bound to the object context
@param {*} obj The object which will be bound
@returns {Bind} The bound proxy
Creates a bind proxy for the given object Each method of the given object is reflected on the proxy and bound to the object context