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
  3e388cca_bc0a_97e5_b53f_2900ace22029["findPrevElement()"]
  101d3d34_ac07_228f_62b9_5d5ac4a0ea2e["index.ts"]
  3e388cca_bc0a_97e5_b53f_2900ace22029 -->|defined in| 101d3d34_ac07_228f_62b9_5d5ac4a0ea2e
  c884999e_bd3e_83b2_f046_49d3a385e621["processIfConditions()"]
  c884999e_bd3e_83b2_f046_49d3a385e621 -->|calls| 3e388cca_bc0a_97e5_b53f_2900ace22029
  style 3e388cca_bc0a_97e5_b53f_2900ace22029 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()
    }
  }
}

Domain

Subdomains

Frequently Asked Questions

What does findPrevElement() do?
findPrevElement() is a function in the vue codebase, defined in src/compiler/parser/index.ts.
Where is findPrevElement() defined?
findPrevElement() is defined in src/compiler/parser/index.ts at line 583.
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