At my last job we had trouble with some browser extensions trying to add their own html elements to the top of the <body></body>
tag’s children. Which would lead to the Elm virtual dom finding a different element than it expects at certain positions in the dom.
The solution we came to, that we learned from another Elm company, was to modify the compiled javascript from the Elm compiler, so that Browser.application
doesnt look for the <body>
tag, but instead looks for a <div>
directly under the body. Then, our html file that we served would have that <div>
in that position too.