Loading the javascript inside the body caused it to be re-executed when using Turbo Drive navigation.
The #__debugbar element uses data-turbo-permanent to not be reloaded, see #25
And the js file is loaded inside the head element.
I'm a little bit scared that it doesn't work well if the js is loaded before #__debugbar exists in the dom 🤔
The debugbar_javascript helper is now split into 2 helpers:
Loading the javascript inside the body caused it to be re-executed when using Turbo Drive navigation.
The
#__debugbar
element usesdata-turbo-permanent
to not be reloaded, see #25And the js file is loaded inside the
head
element. I'm a little bit scared that it doesn't work well if the js is loaded before#__debugbar
exists in the dom 🤔The
debugbar_javascript
helper is now split into 2 helpers:debugbar_head
for thedebugbar_body
for the