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

Function updateDOMProperties

code/composition/public/app.js:16321–16336  ·  view source on GitHub ↗
(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag)

Source from the content-addressed store, hash-verified

16319}
16320
16321function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {
16322 // TODO: Handle wasCustomComponentTag
16323 for (var i = 0; i < updatePayload.length; i += 2) {
16324 var propKey = updatePayload[i];
16325 var propValue = updatePayload[i + 1];
16326 if (propKey === STYLE) {
16327 setValueForStyles(domElement, propValue, getStack);
16328 } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
16329 setInnerHTML(domElement, propValue);
16330 } else if (propKey === CHILDREN) {
16331 setTextContent(domElement, propValue);
16332 } else {
16333 setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);
16334 }
16335 }
16336}
16337
16338function createElement$1(type, props, rootContainerElement, parentNamespace) {
16339 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