Prevent phoenix.js from messing with DOM

Viewed 66

I have a front end written in Elm, and it is communicating with a Phoenix back end through channels. However, it seems phoenix.js is doing something to the DOM. If the page is idle for a while, I get DOM-related errors in the console, for example:

Uncaught TypeError: Cannot read property 'childNodes' of undefined

or

elm_db.js:3699 Uncaught TypeError: Failed to execute 'removeChild' on 'Node': parameter 1 is not of type 'Node'.

How can I prevent phoenix.js from messing with the DOM?

Edit: Here are two screenshots from the console:

enter image description here

enter image description here

client_ledger.js and client_db.js are my client files that receive and send json objects over the Phoenix channels. elm_ledger.js and elm_db.js are my compiled Elm front ends.

0 Answers
Related