aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/dumbymap.mjs
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-09-30 15:19:58 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-10-01 11:35:11 +0800
commit193ba872c455296bff55e5f6a7d6dbbbb85c265e (patch)
treeb8ebc942676865f52b1d73e05796a82de080ba92 /src/dumbymap.mjs
parentcdd0f2bef5c522eb6809ba58d7d9adc2eb4bd6b3 (diff)
style: way to manage Element.children
Diffstat (limited to 'src/dumbymap.mjs')
-rw-r--r--src/dumbymap.mjs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dumbymap.mjs b/src/dumbymap.mjs
index e0f9ecc..67376c7 100644
--- a/src/dumbymap.mjs
+++ b/src/dumbymap.mjs
@@ -91,7 +91,7 @@ export const createGeoLink = (link, callback = null) => {
91 91
92export const markdown2HTML = (container, mdContent) => { 92export const markdown2HTML = (container, mdContent) => {
93 // Render: Markdown -> HTML {{{ 93 // Render: Markdown -> HTML {{{
94 Array.from(container.children).map(e => e.remove()); 94 container.replaceChildren();
95 95
96 container.innerHTML = '<div class="SemanticHtml"></div>'; 96 container.innerHTML = '<div class="SemanticHtml"></div>';
97 const htmlHolder = container.querySelector('.SemanticHtml'); 97 const htmlHolder = container.querySelector('.SemanticHtml');