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

Function updateDOMProperties

code/dependency-injection/public/app.js:16276–16291  ·  view source on GitHub ↗
(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag)

Source from the content-addressed store, hash-verified

16274}
16275
16276function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {
16277 // TODO: Handle wasCustomComponentTag
16278 for (var i = 0; i < updatePayload.length; i += 2) {
16279 var propKey = updatePayload[i];
16280 var propValue = updatePayload[i + 1];
16281 if (propKey === STYLE) {
16282 setValueForStyles(domElement, propValue, getStack);
16283 } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
16284 setInnerHTML(domElement, propValue);
16285 } else if (propKey === CHILDREN) {
16286 setTextContent(domElement, propValue);
16287 } else {
16288 setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);
16289 }
16290 }
16291}
16292
16293function createElement$1(type, props, rootContainerElement, parentNamespace) {
16294 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