js/core/Bindable.js
function () {
                    if (this._$source) {
                        var val, attributes = {}, unsetAttributes = {};
                        for (var key in this.$) {
                            if (this.$.hasOwnProperty(key)) {
                                val = this.$[key];
                                if (val instanceof Bindable && val.sync()) {
                                    attributes[key] = val._$source;
                                } else {
                                    attributes[key] = val;
                                }
                            }
                        }
                        // remove all attributes, which are not in clone
                        for (var sourceKey in this._$source.$) {
                            if (this._$source.$.hasOwnProperty(sourceKey)) {
                                if (!attributes.hasOwnProperty(sourceKey)) {
                                    unsetAttributes[sourceKey] = "";
                                }
                            }
                        }
                        this._$source.set(unsetAttributes, {unset: true});
                        this._$source.set(attributes);
                        return true;
                    } else {
                        return false;
                    }

                }
function () {
                    if (this._$source) {
                        var val, attributes = {}, unsetAttributes = {};
                        for (var key in this.$) {
                            if (this.$.hasOwnProperty(key)) {
                                val = this.$[key];
                                if (val instanceof Bindable && val.sync()) {
                                    attributes[key] = val._$source;
                                } else {
                                    attributes[key] = val;
                                }
                            }
                        }
                        // remove all attributes, which are not in clone
                        for (var sourceKey in this._$source.$) {
                            if (this._$source.$.hasOwnProperty(sourceKey)) {
                                if (!attributes.hasOwnProperty(sourceKey)) {
                                    unsetAttributes[sourceKey] = "";
                                }
                            }
                        }
                        this._$source.set(unsetAttributes, {unset: true});
                        this._$source.set(attributes);
                        return true;
                    } else {
                        return false;
                    }

                }
function ( ) { if ( this . _$source ) { var val , attributes = { } , unsetAttributes = { } ; for ( var key in this . $ ) { if ( this . $ . hasOwnProperty ( key ) ) { val = this . $ [ key ] ; if ( val instanceof Bindable && val . sync ( ) ) { attributes [ key ] = val . _$source ; } else { attributes [ key ] = val ; } } } // remove all attributes, which are not in clone for ( var sourceKey in this . _$source . $ ) { if ( this . _$source . $ . hasOwnProperty ( sourceKey ) ) { if ( ! attributes . hasOwnProperty ( sourceKey ) ) { unsetAttributes [ sourceKey ] = "" ; } } } this . _$source . set ( unsetAttributes , { unset : true } ) ; this . _$source . set ( attributes ) ; return true ; } else { return false ; } }
Writes attributes back to the source
Writes attributes back to the source