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

Function updateDOMProperties

code/third-party/public/app.js:15416–15431  ·  view source on GitHub ↗
(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag)

Source from the content-addressed store, hash-verified

15414}
15415
15416function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {
15417 // TODO: Handle wasCustomComponentTag
15418 for (var i = 0; i < updatePayload.length; i += 2) {
15419 var propKey = updatePayload[i];
15420 var propValue = updatePayload[i + 1];
15421 if (propKey === STYLE) {
15422 setValueForStyles(domElement, propValue, getStack);
15423 } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
15424 setInnerHTML(domElement, propValue);
15425 } else if (propKey === CHILDREN) {
15426 setTextContent(domElement, propValue);
15427 } else {
15428 setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);
15429 }
15430 }
15431}
15432
15433function createElement$1(type, props, rootContainerElement, parentNamespace) {
15434 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