init_operations() — svelte Function Reference
Architecture documentation for the init_operations() function in operations.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD a413fb77_0391_6be3_509e_911e3ab4e488["init_operations()"] 9a9bbc27_46b6_021c_6d77_f736ed4b40f0["operations.js"] a413fb77_0391_6be3_509e_911e3ab4e488 -->|defined in| 9a9bbc27_46b6_021c_6d77_f736ed4b40f0 e6912e2f_bd46_b7e4_ae8b_8a5955a81c03["hydrate()"] e6912e2f_bd46_b7e4_ae8b_8a5955a81c03 -->|calls| a413fb77_0391_6be3_509e_911e3ab4e488 95c17f0f_1042_263c_3de2_f8ab899408b0["_mount()"] 95c17f0f_1042_263c_3de2_f8ab899408b0 -->|calls| a413fb77_0391_6be3_509e_911e3ab4e488 ff98bd09_e6fd_2deb_9709_503ac689db35["init_array_prototype_warnings()"] a413fb77_0391_6be3_509e_911e3ab4e488 -->|calls| ff98bd09_e6fd_2deb_9709_503ac689db35 style a413fb77_0391_6be3_509e_911e3ab4e488 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/src/internal/client/dom/operations.js lines 30–73
export function init_operations() {
if ($window !== undefined) {
return;
}
$window = window;
$document = document;
is_firefox = /Firefox/.test(navigator.userAgent);
var element_prototype = Element.prototype;
var node_prototype = Node.prototype;
var text_prototype = Text.prototype;
// @ts-ignore
first_child_getter = get_descriptor(node_prototype, 'firstChild').get;
// @ts-ignore
next_sibling_getter = get_descriptor(node_prototype, 'nextSibling').get;
if (is_extensible(element_prototype)) {
// the following assignments improve perf of lookups on DOM nodes
// @ts-expect-error
element_prototype.__click = undefined;
// @ts-expect-error
element_prototype.__className = undefined;
// @ts-expect-error
element_prototype.__attributes = null;
// @ts-expect-error
element_prototype.__style = undefined;
// @ts-expect-error
element_prototype.__e = undefined;
}
if (is_extensible(text_prototype)) {
// @ts-expect-error
text_prototype.__t = undefined;
}
if (DEV) {
// @ts-expect-error
element_prototype.__svelte_meta = null;
init_array_prototype_warnings();
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does init_operations() do?
init_operations() is a function in the svelte codebase, defined in packages/svelte/src/internal/client/dom/operations.js.
Where is init_operations() defined?
init_operations() is defined in packages/svelte/src/internal/client/dom/operations.js at line 30.
What does init_operations() call?
init_operations() calls 1 function(s): init_array_prototype_warnings.
What calls init_operations()?
init_operations() is called by 2 function(s): _mount, hydrate.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free