normalize_html() — svelte Function Reference
Architecture documentation for the normalize_html() function in html_equal.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD 962cf561_9ad9_cab0_dcda_622ebeb2d812["normalize_html()"] 7e13368c_af2f_099c_e7e1_de404629548f["html_equal.js"] 962cf561_9ad9_cab0_dcda_622ebeb2d812 -->|defined in| 7e13368c_af2f_099c_e7e1_de404629548f 3f18e7a4_4010_5e33_35ee_c53c8401ca03["assert_html_equal()"] 3f18e7a4_4010_5e33_35ee_c53c8401ca03 -->|calls| 962cf561_9ad9_cab0_dcda_622ebeb2d812 1c541d89_49ad_09df_1b04_218f8bcb99e8["assert_html_equal_with_options()"] 1c541d89_49ad_09df_1b04_218f8bcb99e8 -->|calls| 962cf561_9ad9_cab0_dcda_622ebeb2d812 d424cec2_cc06_a0df_bec0_d22ad207a690["clean_children()"] 962cf561_9ad9_cab0_dcda_622ebeb2d812 -->|calls| d424cec2_cc06_a0df_bec0_d22ad207a690 style 962cf561_9ad9_cab0_dcda_622ebeb2d812 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/tests/html_equal.js lines 122–133
export function normalize_html(window, html, { preserveComments = false } = {}) {
try {
const node = window.document.createElement('div');
node.innerHTML = html.trim();
clean_children(node, { preserveComments });
return node.innerHTML;
} catch (err) {
throw new Error(`Failed to normalize HTML:\n${html}\nCause: ${err}`);
}
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does normalize_html() do?
normalize_html() is a function in the svelte codebase, defined in packages/svelte/tests/html_equal.js.
Where is normalize_html() defined?
normalize_html() is defined in packages/svelte/tests/html_equal.js at line 122.
What does normalize_html() call?
normalize_html() calls 1 function(s): clean_children.
What calls normalize_html()?
normalize_html() is called by 2 function(s): assert_html_equal, assert_html_equal_with_options.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free