Home / Function/ isUnknownElement() — vue Function Reference

isUnknownElement() — vue Function Reference

Architecture documentation for the isUnknownElement() function in element.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  9659b297_5ceb_0681_fa7c_c778ac6b32a4["isUnknownElement()"]
  2da82d37_d0a8_bdfd_86ba_26432270288e["createPatchFunction()"]
  2da82d37_d0a8_bdfd_86ba_26432270288e -->|calls| 9659b297_5ceb_0681_fa7c_c778ac6b32a4
  dd2a7b0a_6fa5_b3c5_4c59_dfd424e87bac["isReservedTag()"]
  9659b297_5ceb_0681_fa7c_c778ac6b32a4 -->|calls| dd2a7b0a_6fa5_b3c5_4c59_dfd424e87bac
  c7fb0b96_a593_dfb8_3f7a_2f40701511a4["toString()"]
  9659b297_5ceb_0681_fa7c_c778ac6b32a4 -->|calls| c7fb0b96_a593_dfb8_3f7a_2f40701511a4
  style 9659b297_5ceb_0681_fa7c_c778ac6b32a4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/platforms/web/util/element.ts lines 50–72

export function isUnknownElement(tag: string): boolean {
  /* istanbul ignore if */
  if (!inBrowser) {
    return true
  }
  if (isReservedTag(tag)) {
    return false
  }
  tag = tag.toLowerCase()
  /* istanbul ignore if */
  if (unknownElementCache[tag] != null) {
    return unknownElementCache[tag]
  }
  const el = document.createElement(tag)
  if (tag.indexOf('-') > -1) {
    // https://stackoverflow.com/a/28210364/1070244
    return (unknownElementCache[tag] =
      el.constructor === window.HTMLUnknownElement ||
      el.constructor === window.HTMLElement)
  } else {
    return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))
  }
}

Domain

Subdomains

Frequently Asked Questions

What does isUnknownElement() do?
isUnknownElement() is a function in the vue codebase.
What does isUnknownElement() call?
isUnknownElement() calls 2 function(s): isReservedTag, toString.
What calls isUnknownElement()?
isUnknownElement() is called by 1 function(s): createPatchFunction.

Analyze Your Own Codebase

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

Try Supermodel Free