Hoplon + boot-reload appending HTML to body


#1

Hi,

I have finally started playing with the Hoplon framework for a small project. For that, I decided to pick up Boot again, since I really liked it for cljs-work last time I did that. I’m having trouble getting the browser reload functionality working properly.

The problem is not with picking up the changes; rather it is that the rendered HTML is not replaced. When a hoplon file is reloaded the HTML contents of the body tag are appended to the browser DOM instead of replacing the body tag.

I am not at a computer at the moment, and if someone has an idea but needs more context, I can add a small example later.

Thanks!


#2

I’ve also ran into this and have made a half hearted attempt to get to the bottom of it.

What operating system are you on?

I’ll take another look at it and at least file a bug report if I can’t figure it out


#3

Cool! I understand that the hoplon html and body functions are supposed to be singleton, i.e. replace contents on evaluation, so I am guessing it has to be something there? I use Arch Linux.


#4

I know this doesn’t solve your issue, but lately, partly due to this same issue, I’ve been preferring to use hoplon with shadow-cljs.

I threw up a quick skeleton starter project for using the two together here:

I’m still not entirely sure if this is supposed to be necessary or not, but I get rid of the old dom that is being appended to here:


#5

I think the clearing of DOM nodes is enough to make reloading work as expected. I will try it when I get the chance and report back. It does feel like a bug though, does it not?

Thanks for looking into this.


#6

Tried, and adding the clearing of DOM nodes works as expected. Now I just need to figure out how to properly initialize on load. :slight_smile:


#7

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.