Code Monkey home page Code Monkey logo

Comments (1)

brunoprietog avatar brunoprietog commented on August 23, 2024

What happens is that Turbo expects the src of a Turbo Frame to be used only the first time, or otherwise changed via JavaScript. When Turbo makes the request associated with a Turbo Frame, it will only replace that Turbo Frame with the content of the other Turbo Frame that comes in the response. It will not touch anything in the turbo-frame element itself, Except for the src attribute, which is set to the page on which the visit ended from which the new Turbo Frame content was obtained, and other things such as the complete attribute. So when you return to the main page, the original src of the Turbo Frame is never set (/metrics/energy/day). Instead, the src will be the page URL that the Turbo Frame was directed to, which would be the main page in this case (/day/energy). When you browse Turbo Frames, you should only expect what is inside them to change, but not the element itself. I hope I have explained well. I think this is the intended behavior anyway.

from turbo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.