node-ops.ts — vue Source File
Architecture documentation for node-ops.ts, a typescript file in the vue codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 4f426213_dc7c_0099_96f8_fd84efdd25a2["node-ops.ts"] 973389ac_8625_30a3_53ce_b1b48fae58c5["vnode"] 4f426213_dc7c_0099_96f8_fd84efdd25a2 --> 973389ac_8625_30a3_53ce_b1b48fae58c5 28507de2_df66_4d38_8b45_3af459d16f77["index"] 4f426213_dc7c_0099_96f8_fd84efdd25a2 --> 28507de2_df66_4d38_8b45_3af459d16f77 style 4f426213_dc7c_0099_96f8_fd84efdd25a2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import VNode from 'core/vdom/vnode'
import { namespaceMap } from 'web/util/index'
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
}
export function createElementNS(namespace: string, tagName: string): Element {
return document.createElementNS(namespaceMap[namespace], tagName)
}
export function createTextNode(text: string): Text {
return document.createTextNode(text)
}
export function createComment(text: string): Comment {
return document.createComment(text)
}
export function insertBefore(
parentNode: Node,
newNode: Node,
referenceNode: Node
) {
parentNode.insertBefore(newNode, referenceNode)
}
export function removeChild(node: Node, child: Node) {
node.removeChild(child)
}
export function appendChild(node: Node, child: Node) {
node.appendChild(child)
}
export function parentNode(node: Node) {
return node.parentNode
}
export function nextSibling(node: Node) {
return node.nextSibling
}
export function tagName(node: Element): string {
return node.tagName
}
export function setTextContent(node: Node, text: string) {
node.textContent = text
}
export function setStyleScope(node: Element, scopeId: string) {
node.setAttribute(scopeId, '')
}
Domain
Subdomains
Functions
Dependencies
- index
- vnode
Source
Frequently Asked Questions
What does node-ops.ts do?
node-ops.ts is a source file in the vue codebase, written in typescript. It belongs to the WebPlatform domain, WebRuntime subdomain.
What functions are defined in node-ops.ts?
node-ops.ts defines 12 function(s): appendChild, createComment, createElement, createElementNS, createTextNode, insertBefore, nextSibling, parentNode, removeChild, setStyleScope, and 2 more.
What does node-ops.ts depend on?
node-ops.ts imports 2 module(s): index, vnode.
Where is node-ops.ts in the architecture?
node-ops.ts is located at src/platforms/web/runtime/node-ops.ts (domain: WebPlatform, subdomain: WebRuntime, directory: src/platforms/web/runtime).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free