there is a other way to write in JS the switch statement , This code is working :)
_update: function(oHtml, oConfig) {
var _this = this;
var oParent;
if (oConfig.attributes != null) {
oConfig.attributes.forEach(function(oAttr) {
//debugger;
oParent = oHtml.find("#" + oAttr.id);
switch (oAttr.action) {
case 'upd':
_this._updateAttr(oParent, oAttr);
break;
case 'new':
_this._insertAttr(oParent, oAttr);
break;
case 'del':
_this._removeAttr(oParent, oAttr);
}
});
return oHtml;
}
},
We are using require JS