Code Monkey home page Code Monkey logo

fetch-pjax's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fetch-pjax's Issues

How to achieve redirections?

Thank you for the great library. I have started to give a try to this. It's working well and really fasts. But the problem which I found is I couldn't make a redirection anyway if server-side returns a redirection URL. Can you please give me an idea of how I can make a redirection or if I miss something please give your advice.

Wait for condition to be true before replacing the main content

Hi Dave!

Thanks for your very nice library, it works like a charm! ๐Ÿ˜ƒ
I don't know if you're still maintaining the library, nevertheless I'll try to ask.

Is there an option or callback to wait for some condition to be true, before applying the main content replace?

Although "skeleton screens" are the hottest **** right now, I'm trying to implement a loading animation. It should be visible until all of the "Pjaxed" images are loaded.
I'm using the following code to check if all the images are loaded:

[].forEach.call(images, function(img) {
  img.onload = function() {
    amount--;
    if (amount === 0) {
      // Replace the main content here
      console.log("all images loaded, ready to replace the main content")
    }
  }
});

However, of course the library can't wait for the images to be loaded and then replace the content.

Is there maybe something like
onBeforeRenderButWaitForSomethingToBeTrue = > X?

Could I store the main content temporarily in a DocumentFragment before and then wait for some condition to be true and then replace the main content with the DocumentFragment?

Or maybe I'm missing something?

Thanks again for the great library, it helped a lot!

The forward browser button doesn't update the page.

If you press the back button everything works find but when you then press the forward button nothing happens but a title and url change. Also not if you use defer on the script tag or if put the fetch.js before the closing body tag. Browsers: Chrome/Safari/Firefox

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.