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

Function applySSRDirectives

packages/server-renderer/src/render.ts:370–387  ·  view source on GitHub ↗
(
  vnode: VNode,
  rawProps: VNodeProps | null,
  dirs: DirectiveBinding[],
)

Source from the content-addressed store, hash-verified

368}
369
370function applySSRDirectives(
371 vnode: VNode,
372 rawProps: VNodeProps | null,
373 dirs: DirectiveBinding[],
374): VNodeProps {
375 const toMerge: VNodeProps[] = []
376 for (let i = 0; i < dirs.length; i++) {
377 const binding = dirs[i]
378 const {
379 dir: { getSSRProps },
380 } = binding
381 if (getSSRProps) {
382 const props = getSSRProps(binding, vnode)
383 if (props) toMerge.push(props)
384 }
385 }
386 return mergeProps(rawProps || {}, ...toMerge)
387}
388
389function renderTeleportVNode(
390 push: PushFn,

Callers 1

renderVNodeFunction · 0.85

Calls 3

getSSRPropsFunction · 0.85
mergePropsFunction · 0.85
pushMethod · 0.65

Tested by

no test coverage detected