Giter VIP home page Giter VIP logo

Comments (13)

balupton avatar balupton commented on September 13, 2024

Yeah it's a good point. I solved this with jQuery Ajaxy which I'm working on updating for History.js. So for now you're out of luck, but I will improve this soon enough :)

from history.js.

yohanleafheart avatar yohanleafheart commented on September 13, 2024

Got it. But if there is a way I can identify if the state I want to push is the same as the current state, I can code around it. But I don't know if that comparison is possible.

from history.js.

balupton avatar balupton commented on September 13, 2024

It's quite hackish but you it should be something like History.normalizeState(...).id === History.getState().id

I'm on my iPhone before bed so can't confirm. But that should be right, check tests.js we do something like that in there.

Otherwise waiting is the best bet. Patience patience patience eh? ;P

from history.js.

yohanleafheart avatar yohanleafheart commented on September 13, 2024

hehe. Yeah. But you said you are fixing it with jQuery ajax, and I'm using Mootools, so I can't wait for that. I will try it and post to see if it worked.

from history.js.

balupton avatar balupton commented on September 13, 2024

Okay. I've thought about how I will do this. I'll make it so the statechange event still fires and provide a History.getState().same flag.

It is a better solution than adding an additional statesame event, as issue #42 is also dependent on this.

from history.js.

balupton avatar balupton commented on September 13, 2024

Perhaps I should add the option: History.options.preventSameStateFromFiringStateChange so extra configuration is not needed in the statechange handler. Thoughts? /cc @yohanleafheart @markjaquith @deleteme

from history.js.

yohanleafheart avatar yohanleafheart commented on September 13, 2024

I like the idea of the configuration because most application will work better (or at least more consistent) if it is not fired. Besides that, allowing the statechange to fire is fantastic.

from history.js.

deleteme avatar deleteme commented on September 13, 2024

I do not have a good enough understanding of the problem at hand, or the solution proposed, to have an opinion on it. Also, This is the first time I saw that you tagged me in the thread. I don't know how github intends on notifying people.

from history.js.

balupton avatar balupton commented on September 13, 2024

I won't do the option, I'll improve the documentation - it will be up for the individual to be aware.

from history.js.

yohanleafheart avatar yohanleafheart commented on September 13, 2024

Hey mate, any ETA on this so I can program myself to get the latest?

from history.js.

balupton avatar balupton commented on September 13, 2024

Hey mate, my MacBook died a week ago and I'll only receive my new machine towards the end of the month. In the meantime I'm on an old laptop so have enough power to code, but not enough power to test. So around the start June is when the new release will be out.

from history.js.

danspam avatar danspam commented on September 13, 2024

Hi, is there any progress on a solution to this issue?

from history.js.

balupton avatar balupton commented on September 13, 2024

It's inside the v1.8 branch, though that branch isn't stable yet. Not sure when I'll be able to line up more work to pay for history.js development, so feel free to submit pull requests for the 1.8 branch. I'll happily provide any assistance for people who are looking to contribute to history.js development.

from history.js.

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.