lib/kissy/5.0.0-alpha.3/build/attribute-debug.js
function (name, value) {
            var self = this, setValue,
                // if host does not have meta info corresponding to (name,value)
                // then register on demand in order to collect all data meta info
                // 一定要注册属性元数据，否则其他模块通过 _attrs 不能枚举到所有有效属性
                // 因为属性在声明注册前可以直接设置值
                attrConfig = ensureNonEmpty(self.getAttrs(), name), setter = attrConfig.setter;    // if setter has effect
            // if setter has effect
            if (setter && (setter = normalFn(self, setter))) {
                setValue = setter.call(self, value, name);
            }
            if (setValue === INVALID) {
                return FALSE;
            }
            if (setValue !== undefined) {
                value = setValue;
            }    // finally set
            // finally set
            getAttrVals(self)[name] = value;
            return undefined;
        }
function (name, value) {
            var self = this, setValue,
                // if host does not have meta info corresponding to (name,value)
                // then register on demand in order to collect all data meta info
                // 一定要注册属性元数据，否则其他模块通过 _attrs 不能枚举到所有有效属性
                // 因为属性在声明注册前可以直接设置值
                attrConfig = ensureNonEmpty(self.getAttrs(), name), setter = attrConfig.setter;    // if setter has effect
            // if setter has effect
            if (setter && (setter = normalFn(self, setter))) {
                setValue = setter.call(self, value, name);
            }
            if (setValue === INVALID) {
                return FALSE;
            }
            if (setValue !== undefined) {
                value = setValue;
            }    // finally set
            // finally set
            getAttrVals(self)[name] = value;
            return undefined;
        }
function ( name , value ) { var self = this , setValue , // if host does not have meta info corresponding to (name,value) // then register on demand in order to collect all data meta info // 一定要注册属性元数据，否则其他模块通过 _attrs 不能枚举到所有有效属性 // 因为属性在声明注册前可以直接设置值 attrConfig = ensureNonEmpty ( self . getAttrs ( ) , name ) , setter = attrConfig . setter ; // if setter has effect // if setter has effect if ( setter && ( setter = normalFn ( self , setter ) ) ) { setValue = setter . call ( self , value , name ) ; } if ( setValue === INVALID ) { return FALSE ; } if ( setValue !== undefined ) { value = setValue ; } // finally set // finally set getAttrVals ( self ) [ name ] = value ; return undefined ; }
internal use, no event involved, just set.
override by model
@protected
internal use no event involved just set . override by model