MCPcopy
hub / github.com/vuejs/core / updateCssVars

Function updateCssVars

packages/runtime-core/src/components/Teleport.ts:547–566  ·  view source on GitHub ↗
(vnode: VNode, isDisabled: boolean)

Source from the content-addressed store, hash-verified

545}
546
547function updateCssVars(vnode: VNode, isDisabled: boolean) {
548 // presence of .ut method indicates owner component uses css vars.
549 // code path here can assume browser environment.
550 const ctx = vnode.ctx
551 if (ctx && ctx.ut) {
552 let node, anchor
553 if (isDisabled) {
554 node = vnode.el
555 anchor = vnode.anchor
556 } else {
557 node = vnode.targetStart
558 anchor = vnode.targetAnchor
559 }
560 while (node && node !== anchor) {
561 if (node.nodeType === 1) node.setAttribute('data-v-owner', ctx.uid)
562 node = node.nextSibling
563 }
564 ctx.ut()
565 }
566}
567
568function prepareAnchor(
569 target: RendererElement | null,

Callers 4

mountToTargetFunction · 0.85
mountJobFunction · 0.85
processFunction · 0.85
hydrateTeleportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected