genAttrSegment() — vue Function Reference
Architecture documentation for the genAttrSegment() function in modules.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 3561315d_c822_c2b2_64d4_ead55e1cfeef["genAttrSegment()"] 169d7521_c7a1_2d02_328a_7bdacb7fcee6["genAttrSegments()"] 169d7521_c7a1_2d02_328a_7bdacb7fcee6 -->|calls| 3561315d_c822_c2b2_64d4_ead55e1cfeef fa544f11_0c48_ef02_0a1e_2942ccbf1f8a["genDOMPropSegments()"] fa544f11_0c48_ef02_0a1e_2942ccbf1f8a -->|calls| 3561315d_c822_c2b2_64d4_ead55e1cfeef style 3561315d_c822_c2b2_64d4_ead55e1cfeef fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/server-renderer/src/optimizing-compiler/modules.ts lines 56–78
function genAttrSegment(name: string, value: string): StringSegment {
if (plainStringRE.test(value)) {
// force double quote
value = value.replace(/^'|'$/g, '"')
// force enumerated attr to "true"
if (isEnumeratedAttr(name) && value !== `"false"`) {
value = `"true"`
}
return {
type: RAW,
value: isBooleanAttr(name)
? ` ${name}="${name}"`
: value === '""'
? ` ${name}`
: ` ${name}="${JSON.parse(value)}"`
}
} else {
return {
type: EXPRESSION,
value: `_ssrAttr(${JSON.stringify(name)},${value})`
}
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does genAttrSegment() do?
genAttrSegment() is a function in the vue codebase.
What calls genAttrSegment()?
genAttrSegment() is called by 2 function(s): genAttrSegments, genDOMPropSegments.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free