Home / Function/ createElement() — vue Function Reference

createElement() — vue Function Reference

Architecture documentation for the createElement() function in node-ops.ts from the vue codebase.

Entity Profile

Relationship Graph

Source Code

src/platforms/web/runtime/node-ops.ts lines 4–18

export function createElement(tagName: string, vnode: VNode): Element {
  const elm = document.createElement(tagName)
  if (tagName !== 'select') {
    return elm
  }
  // false or null will remove the attribute but undefined will not
  if (
    vnode.data &&
    vnode.data.attrs &&
    vnode.data.attrs.multiple !== undefined
  ) {
    elm.setAttribute('multiple', 'multiple')
  }
  return elm
}

Domain

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free