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 c9a3b1d9_7c77_87ee_417c_f1bb5864d89c["node-ops.ts"] f6868225_acf7_afdc_ebd3_15704ddb6566["vnode"] c9a3b1d9_7c77_87ee_417c_f1bb5864d89c --> f6868225_acf7_afdc_ebd3_15704ddb6566 148abdbd_b24a_66f6_25f5_6786df341ad2["index"] c9a3b1d9_7c77_87ee_417c_f1bb5864d89c --> 148abdbd_b24a_66f6_25f5_6786df341ad2 style c9a3b1d9_7c77_87ee_417c_f1bb5864d89c 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, RuntimeModules 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: RuntimeModules, 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