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
  802eec95_917b_07e2_b5ac_340967118c72["findPrevElement()"]
  f819e82d_0c73_4842_095d_5d0adae6ddd9["processIfConditions()"]
  f819e82d_0c73_4842_095d_5d0adae6ddd9 -->|calls| 802eec95_917b_07e2_b5ac_340967118c72
  style 802eec95_917b_07e2_b5ac_340967118c72 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.
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