Home / Function/ processRawAttrs() — vue Function Reference

processRawAttrs() — vue Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  f1b586b0_0e47_0f12_dbf3_fbdf579b248a["processRawAttrs()"]
  c27f0203_4eed_0348_4118_e8e105adc6ee["parse()"]
  c27f0203_4eed_0348_4118_e8e105adc6ee -->|calls| f1b586b0_0e47_0f12_dbf3_fbdf579b248a
  style f1b586b0_0e47_0f12_dbf3_fbdf579b248a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/compiler/parser/index.ts lines 430–449

function processRawAttrs(el) {
  const list = el.attrsList
  const len = list.length
  if (len) {
    const attrs: Array<ASTAttr> = (el.attrs = new Array(len))
    for (let i = 0; i < len; i++) {
      attrs[i] = {
        name: list[i].name,
        value: JSON.stringify(list[i].value)
      }
      if (list[i].start != null) {
        attrs[i].start = list[i].start
        attrs[i].end = list[i].end
      }
    }
  } else if (!el.pre) {
    // non root node in pre blocks with no attributes
    el.plain = true
  }
}

Subdomains

Called By

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free