MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / updateDOMProperties

Function updateDOMProperties

code/styling/public/app.js:16183–16198  ·  view source on GitHub ↗
(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag)

Source from the content-addressed store, hash-verified

16181}
16182
16183function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {
16184 // TODO: Handle wasCustomComponentTag
16185 for (var i = 0; i < updatePayload.length; i += 2) {
16186 var propKey = updatePayload[i];
16187 var propValue = updatePayload[i + 1];
16188 if (propKey === STYLE) {
16189 setValueForStyles(domElement, propValue, getStack);
16190 } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
16191 setInnerHTML(domElement, propValue);
16192 } else if (propKey === CHILDREN) {
16193 setTextContent(domElement, propValue);
16194 } else {
16195 setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);
16196 }
16197 }
16198}
16199
16200function createElement$1(type, props, rootContainerElement, parentNamespace) {
16201 var isCustomComponentTag = void 0;

Callers 1

updateProperties$1Function · 0.70

Calls 3

setValueForStylesFunction · 0.70
setTextContentFunction · 0.70
setValueForPropertyFunction · 0.70

Tested by

no test coverage detected