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

Function updateDOMProperties

code/new-context-api/public/app.js:15544–15559  ·  view source on GitHub ↗
(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag)

Source from the content-addressed store, hash-verified

15542}
15543
15544function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {
15545 // TODO: Handle wasCustomComponentTag
15546 for (var i = 0; i < updatePayload.length; i += 2) {
15547 var propKey = updatePayload[i];
15548 var propValue = updatePayload[i + 1];
15549 if (propKey === STYLE) {
15550 setValueForStyles(domElement, propValue, getStack);
15551 } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
15552 setInnerHTML(domElement, propValue);
15553 } else if (propKey === CHILDREN) {
15554 setTextContent(domElement, propValue);
15555 } else {
15556 setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);
15557 }
15558 }
15559}
15560
15561function createElement$1(type, props, rootContainerElement, parentNamespace) {
15562 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