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

Function updateDOMProperties

code/communication/public/app.js:16218–16233  ·  view source on GitHub ↗
(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag)

Source from the content-addressed store, hash-verified

16216}
16217
16218function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {
16219 // TODO: Handle wasCustomComponentTag
16220 for (var i = 0; i < updatePayload.length; i += 2) {
16221 var propKey = updatePayload[i];
16222 var propValue = updatePayload[i + 1];
16223 if (propKey === STYLE) {
16224 setValueForStyles(domElement, propValue, getStack);
16225 } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
16226 setInnerHTML(domElement, propValue);
16227 } else if (propKey === CHILDREN) {
16228 setTextContent(domElement, propValue);
16229 } else {
16230 setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);
16231 }
16232 }
16233}
16234
16235function createElement$1(type, props, rootContainerElement, parentNamespace) {
16236 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