From ac093868d25c3a1d185c4d05ac6545320874fbc3 Mon Sep 17 00:00:00 2001 From: jinjor Date: Tue, 22 Oct 2019 19:43:08 +0900 Subject: [PATCH] comment out debug logs --- patch/VirtualDom.patch | 10 ++++----- public/simple-init.js | 48 +++++++++++++++++++++--------------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/patch/VirtualDom.patch b/patch/VirtualDom.patch index 27eaa43..bde9cd4 100644 --- a/patch/VirtualDom.patch +++ b/patch/VirtualDom.patch @@ -1,5 +1,5 @@ --- Kernel/original_VirtualDom.js 2019-10-05 04:17:25.000000000 +0900 -+++ Kernel/VirtualDom.js 2019-10-22 19:38:46.000000000 +0900 ++++ Kernel/VirtualDom.js 2019-10-22 19:42:42.000000000 +0900 @@ -419,7 +419,9 @@ if (tag === __2_TEXT) @@ -25,10 +25,10 @@ var childNodes = domNode.childNodes; - for (var j = 0; j < vKids.length; j++) + if(domNode.tagName === "BODY") { -+ console.log("addDomeNodeHelp", vKids.length); -+ for (let c of document.body.childNodes) { -+ console.log(" " + c.tagName, c.created_by_elm); -+ } ++ // console.log("addDomeNodeHelp", vKids.length); ++ // for (let c of document.body.childNodes) { ++ // console.log(" " + c.tagName, c.created_by_elm); ++ // } + } + + for (var j = 0, k = 0; j < Math.max(vKids.length, childNodes.length); j++, k++) diff --git a/public/simple-init.js b/public/simple-init.js index bfe418b..fe7960a 100644 --- a/public/simple-init.js +++ b/public/simple-init.js @@ -4,15 +4,15 @@ const main = params.get("main") || "Element"; const app = Elm.Simple[main].init({ node: document.getElementById("root") }); -console.log("After init"); -for (let c of document.body.childNodes) { - console.log(" " + c.tagName, c.created_by_elm); -} +// console.log("After init"); +// for (let c of document.body.childNodes) { +// console.log(" " + c.tagName, c.created_by_elm); +// } setTimeout(() => { - console.log("After init 2"); - for (let c of document.body.childNodes) { - console.log(" " + c.tagName, c.created_by_elm); - } + // console.log("After init 2"); + // for (let c of document.body.childNodes) { + // console.log(" " + c.tagName, c.created_by_elm); + // } }); app.ports.event.subscribe(s => { if (window.notifyEvent) { @@ -21,10 +21,10 @@ app.ports.event.subscribe(s => { app.ports.done.send(""); }); app.ports.insertIntoBody.subscribe(([id, top, bottom]) => { - console.log("Before insert"); - for (let c of document.body.childNodes) { - console.log(" " + c.tagName, c.created_by_elm, c.nodeType); - } + // console.log("Before insert"); + // for (let c of document.body.childNodes) { + // console.log(" " + c.tagName, c.created_by_elm, c.nodeType); + // } for (let i = 0; i < top; i++) { const node = `
EXTENSION NODE
`; @@ -36,10 +36,10 @@ app.ports.insertIntoBody.subscribe(([id, top, bottom]) => { } app.ports.done.send(id); - console.log("After insert"); - for (let c of document.body.childNodes) { - console.log(" " + c.tagName, c.created_by_elm); - } + // console.log("After insert"); + // for (let c of document.body.childNodes) { + // console.log(" " + c.tagName, c.created_by_elm); + // } }); app.ports.insertBeforeTarget.subscribe(id => { const target = document.querySelector(`#${id} .target`); @@ -75,16 +75,16 @@ app.ports.updateAttribute.subscribe(id => { app.ports.done.send(id); }); app.ports.removeInsertedNode.subscribe(id => { - console.log("Before remove"); - for (let c of document.body.childNodes) { - console.log(" " + c.tagName, c.created_by_elm); - } + // console.log("Before remove"); + // for (let c of document.body.childNodes) { + // console.log(" " + c.tagName, c.created_by_elm); + // } for (let el of document.querySelectorAll(`.ext`)) { el.remove(); } - console.log("After remove"); - for (let c of document.body.childNodes) { - console.log(" " + c.tagName, c.created_by_elm); - } + // console.log("After remove"); + // for (let c of document.body.childNodes) { + // console.log(" " + c.tagName, c.created_by_elm); + // } app.ports.done.send(id); });