turbolinks/turbolinks-classic

temporary inside permanent

neohunter opened this issue · 0 comments

Using turbolinks 3, current master.

I've this

<nav id="m" data-turbolinks-permanent>
   ...
   <span id="notifications_counter" data-turbolinks-temporary>3</span>
</nav>

But it does not seems to work, the span content keeps the same. I've tried to write a workaround for this using the differents events of pageload, for example:

addEventListener("page:change", function(newBody) {
   counter = $(newBody.data).find('#notification_counter').text();
...

But the counter is always the original loaded value, I guess because is inside on permanent, Is there a way to access the real html code that was loaded previous to the permanent modifications? Or this should work?