src/sap.ui.core/src/sap/ui/core/Element.js
function(element, key, value, writeToDom) {

			// DELETE
			if (value === null) { // delete this property
				var dataObject = getDataObject(element, key);
				if (!dataObject) {
					return;
				}

				var dataCount = element.getAggregation("customData").length;
				if (dataCount == 1) {
					element.destroyAggregation("customData", true); // destroy if there is no other data
				} else {
					element.removeAggregation("customData", dataObject, true);
					dataObject.destroy();
				}

				// ADD or CHANGE
			} else {
				var CustomData = sap.ui.requireSync('sap/ui/core/CustomData');
				var dataObject = getDataObject(element, key);
				if (dataObject) {
					dataObject.setValue(value);
					dataObject.setWriteToDom(writeToDom);
				} else {
					var dataObject = new CustomData({key:key,value:value, writeToDom:writeToDom});
					element.addAggregation("customData", dataObject, true);
				}
			}
		}
function(element, key, value, writeToDom) {

			// DELETE
			if (value === null) { // delete this property
				var dataObject = getDataObject(element, key);
				if (!dataObject) {
					return;
				}

				var dataCount = element.getAggregation("customData").length;
				if (dataCount == 1) {
					element.destroyAggregation("customData", true); // destroy if there is no other data
				} else {
					element.removeAggregation("customData", dataObject, true);
					dataObject.destroy();
				}

				// ADD or CHANGE
			} else {
				var CustomData = sap.ui.requireSync('sap/ui/core/CustomData');
				var dataObject = getDataObject(element, key);
				if (dataObject) {
					dataObject.setValue(value);
					dataObject.setWriteToDom(writeToDom);
				} else {
					var dataObject = new CustomData({key:key,value:value, writeToDom:writeToDom});
					element.addAggregation("customData", dataObject, true);
				}
			}
		}
function ( element , key , value , writeToDom ) { // DELETE if ( value === null ) { // delete this property var dataObject = getDataObject ( element , key ) ; if ( ! dataObject ) { return ; } var dataCount = element . getAggregation ( "customData" ) . length ; if ( dataCount == 1 ) { element . destroyAggregation ( "customData" , true ) ; // destroy if there is no other data } else { element . removeAggregation ( "customData" , dataObject , true ) ; dataObject . destroy ( ) ; } // ADD or CHANGE } else { var CustomData = sap . ui . requireSync ( 'sap/ui/core/CustomData' ) ; var dataObject = getDataObject ( element , key ) ; if ( dataObject ) { dataObject . setValue ( value ) ; dataObject . setWriteToDom ( writeToDom ) ; } else { var dataObject = new CustomData ( { key : key , value : value , writeToDom : writeToDom } ) ; element . addAggregation ( "customData" , dataObject , true ) ; } } }
Contains the data modification logic
Contains the data modification logic