Home / Function/ findPrevElement() — vue Function Reference

findPrevElement() — vue Function Reference

Architecture documentation for the findPrevElement() function in index.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  1793f641_7f01_f606_9ff2_ea7585e4a784["findPrevElement()"]
  b0895ac7_be65_09b3_28ea_cc60452a3e8d["processIfConditions()"]
  b0895ac7_be65_09b3_28ea_cc60452a3e8d -->|calls| 1793f641_7f01_f606_9ff2_ea7585e4a784
  style 1793f641_7f01_f606_9ff2_ea7585e4a784 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/compiler/parser/index.ts lines 583–599

function findPrevElement(children: Array<any>): ASTElement | void {
  let i = children.length
  while (i--) {
    if (children[i].type === 1) {
      return children[i]
    } else {
      if (__DEV__ && children[i].text !== ' ') {
        warn(
          `text "${children[i].text.trim()}" between v-if and v-else(-if) ` +
            `will be ignored.`,
          children[i]
        )
      }
      children.pop()
    }
  }
}

Subdomains

Frequently Asked Questions

What does findPrevElement() do?
findPrevElement() is a function in the vue codebase.
What calls findPrevElement()?
findPrevElement() is called by 1 function(s): processIfConditions.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free