renderDOMProps() — vue Function Reference
Architecture documentation for the renderDOMProps() function in dom-props.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD c0b33b28_c53f_db55_fab1_7f6054379fe4["renderDOMProps()"] 2be3818d_a4f3_495c_543c_ee071b428982["isDef()"] c0b33b28_c53f_db55_fab1_7f6054379fe4 -->|calls| 2be3818d_a4f3_495c_543c_ee071b428982 7a0093e3_a58a_af71_971f_488b65897e74["extend()"] c0b33b28_c53f_db55_fab1_7f6054379fe4 -->|calls| 7a0093e3_a58a_af71_971f_488b65897e74 a1f5b8ca_b6d5_6b24_155e_038685c97c85["isUndef()"] c0b33b28_c53f_db55_fab1_7f6054379fe4 -->|calls| a1f5b8ca_b6d5_6b24_155e_038685c97c85 5157b463_3064_5555_5624_29889ac80136["setText()"] c0b33b28_c53f_db55_fab1_7f6054379fe4 -->|calls| 5157b463_3064_5555_5624_29889ac80136 bb53260c_b91e_4c53_9052_5970ccb57525["toString()"] c0b33b28_c53f_db55_fab1_7f6054379fe4 -->|calls| bb53260c_b91e_4c53_9052_5970ccb57525 dfde1ef6_e1eb_f805_b004_15ea50f02cb9["isRenderableAttr()"] c0b33b28_c53f_db55_fab1_7f6054379fe4 -->|calls| dfde1ef6_e1eb_f805_b004_15ea50f02cb9 5a73be1a_07f5_5a0a_d729_edcdc84b830c["renderAttr()"] c0b33b28_c53f_db55_fab1_7f6054379fe4 -->|calls| 5a73be1a_07f5_5a0a_d729_edcdc84b830c style c0b33b28_c53f_db55_fab1_7f6054379fe4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/server-renderer/src/modules/dom-props.ts lines 7–44
export default function renderDOMProps(node: VNodeWithData): string {
let props = node.data.domProps
let res = ''
let parent = node.parent
while (isDef(parent)) {
if (parent.data && parent.data.domProps) {
props = extend(extend({}, props), parent.data.domProps)
}
parent = parent.parent
}
if (isUndef(props)) {
return res
}
const attrs = node.data.attrs
for (const key in props) {
if (key === 'innerHTML') {
setText(node, props[key], true)
} else if (key === 'textContent') {
setText(node, props[key], false)
} else if (key === 'value' && node.tag === 'textarea') {
setText(node, toString(props[key]), false)
} else {
// $flow-disable-line (WTF?)
const attr = propsToAttrMap[key] || key.toLowerCase()
if (
isRenderableAttr(attr) &&
// avoid rendering double-bound props/attrs twice
!(isDef(attrs) && isDef(attrs[attr]))
) {
res += renderAttr(attr, props[key])
}
}
}
return res
}
Domain
Subdomains
Source
Frequently Asked Questions
What does renderDOMProps() do?
renderDOMProps() is a function in the vue codebase.
What does renderDOMProps() call?
renderDOMProps() calls 7 function(s): extend, isDef, isRenderableAttr, isUndef, renderAttr, setText, toString.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free