Home / File/ compat.ts — vue Source File

compat.ts — vue Source File

Architecture documentation for compat.ts, a typescript file in the vue codebase. 1 imports, 1 dependents.

File typescript WebPlatform WebCompiler 1 imports 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  41a7b76c_d45b_2c9a_3ce7_24aa4da8ba47["compat.ts"]
  02e43f4a_da65_7acd_5a98_0f017554a159["index"]
  41a7b76c_d45b_2c9a_3ce7_24aa4da8ba47 --> 02e43f4a_da65_7acd_5a98_0f017554a159
  65cd287e_4e6a_7361_27b7_9f8be7ceff8e["runtime-with-compiler.ts"]
  65cd287e_4e6a_7361_27b7_9f8be7ceff8e --> 41a7b76c_d45b_2c9a_3ce7_24aa4da8ba47
  style 41a7b76c_d45b_2c9a_3ce7_24aa4da8ba47 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { inBrowser } from 'core/util/index'

// check whether current browser encodes a char inside attribute values
let div
function getShouldDecode(href: boolean): boolean {
  div = div || document.createElement('div')
  div.innerHTML = href ? `<a href="\n"/>` : `<div a="\n"/>`
  return div.innerHTML.indexOf('&#10;') > 0
}

// #3663: IE encodes newlines inside attribute values while other browsers don't
export const shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false
// #6828: chrome encodes content in a[href]
export const shouldDecodeNewlinesForHref = inBrowser
  ? getShouldDecode(true)
  : false

Domain

Subdomains

Functions

Dependencies

  • index

Frequently Asked Questions

What does compat.ts do?
compat.ts is a source file in the vue codebase, written in typescript. It belongs to the WebPlatform domain, WebCompiler subdomain.
What functions are defined in compat.ts?
compat.ts defines 1 function(s): getShouldDecode.
What does compat.ts depend on?
compat.ts imports 1 module(s): index.
What files import compat.ts?
compat.ts is imported by 1 file(s): runtime-with-compiler.ts.
Where is compat.ts in the architecture?
compat.ts is located at src/platforms/web/util/compat.ts (domain: WebPlatform, subdomain: WebCompiler, directory: src/platforms/web/util).

Analyze Your Own Codebase

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

Try Supermodel Free