src/aria/templates/Section.js
function (newValue) {
                var attribute, domElt = this.getDom(), whiteList = ariaTemplatesDomElementWrapper.attributesWhiteList, newAttributeValue;
                var oldValue = this.attributes;

                // remove old members
                for (attribute in oldValue) {
                    if (oldValue.hasOwnProperty(attribute)) {
                        if (attribute == "dataset") {
                            ariaUtilsHtml.removeDataset(domElt, oldValue[attribute]);
                        } else if (!newValue[attribute]) {
                            if (attribute == "classList") {
                                this.getWrapper().classList.setClassName("");
                            } else {
                                domElt.removeAttribute(attribute);
                            }
                        }
                    }
                }

                // add new members
                for (attribute in newValue) {
                    newAttributeValue = newValue[attribute];
                    if (newValue.hasOwnProperty(attribute) && !this.__json.isMetadata(attribute)
                            && newAttributeValue != null) {
                        if (attribute == "classList") {
                            this.getWrapper().classList.setClassName(newAttributeValue.join(" "));
                        } else if (attribute == "dataset") {
                            ariaUtilsHtml.setDataset(domElt, newAttributeValue);
                        } else if (whiteList.test(attribute) && newAttributeValue !== oldValue[attribute]) {
                            domElt.setAttribute(attribute, newAttributeValue);
                        }
                    }
                }

                this.attributes = this.__json.copy(newValue);
            }
function (newValue) {
                var attribute, domElt = this.getDom(), whiteList = ariaTemplatesDomElementWrapper.attributesWhiteList, newAttributeValue;
                var oldValue = this.attributes;

                // remove old members
                for (attribute in oldValue) {
                    if (oldValue.hasOwnProperty(attribute)) {
                        if (attribute == "dataset") {
                            ariaUtilsHtml.removeDataset(domElt, oldValue[attribute]);
                        } else if (!newValue[attribute]) {
                            if (attribute == "classList") {
                                this.getWrapper().classList.setClassName("");
                            } else {
                                domElt.removeAttribute(attribute);
                            }
                        }
                    }
                }

                // add new members
                for (attribute in newValue) {
                    newAttributeValue = newValue[attribute];
                    if (newValue.hasOwnProperty(attribute) && !this.__json.isMetadata(attribute)
                            && newAttributeValue != null) {
                        if (attribute == "classList") {
                            this.getWrapper().classList.setClassName(newAttributeValue.join(" "));
                        } else if (attribute == "dataset") {
                            ariaUtilsHtml.setDataset(domElt, newAttributeValue);
                        } else if (whiteList.test(attribute) && newAttributeValue !== oldValue[attribute]) {
                            domElt.setAttribute(attribute, newAttributeValue);
                        }
                    }
                }

                this.attributes = this.__json.copy(newValue);
            }
function ( newValue ) { var attribute , domElt = this . getDom ( ) , whiteList = ariaTemplatesDomElementWrapper . attributesWhiteList , newAttributeValue ; var oldValue = this . attributes ; // remove old members for ( attribute in oldValue ) { if ( oldValue . hasOwnProperty ( attribute ) ) { if ( attribute == "dataset" ) { ariaUtilsHtml . removeDataset ( domElt , oldValue [ attribute ] ) ; } else if ( ! newValue [ attribute ] ) { if ( attribute == "classList" ) { this . getWrapper ( ) . classList . setClassName ( "" ) ; } else { domElt . removeAttribute ( attribute ) ; } } } } // add new members for ( attribute in newValue ) { newAttributeValue = newValue [ attribute ] ; if ( newValue . hasOwnProperty ( attribute ) && ! this . __json . isMetadata ( attribute ) && newAttributeValue != null ) { if ( attribute == "classList" ) { this . getWrapper ( ) . classList . setClassName ( newAttributeValue . join ( " " ) ) ; } else if ( attribute == "dataset" ) { ariaUtilsHtml . setDataset ( domElt , newAttributeValue ) ; } else if ( whiteList . test ( attribute ) && newAttributeValue !== oldValue [ attribute ] ) { domElt . setAttribute ( attribute , newAttributeValue ) ; } } } this . attributes = this . __json . copy ( newValue ) ; }
Apply the new attributes by removing the current ones. Even if attributes are bound, the data model is
not updated
@param {aria.templates.CfgBeans:HtmlAttribute} newValue
@protected
Apply the new attributes by removing the current ones . Even if attributes are bound the data model is not updated