Git Product home page Git Product logo

Comments (8)

aadamovich avatar aadamovich commented on June 6, 2024

+1

from deck.js.

tlberglund avatar tlberglund commented on June 6, 2024

👍

from deck.js.

imakewebthings avatar imakewebthings commented on June 6, 2024

What is the suggestion here? To include a thin web server w/ deck.js? To not use replaceState? Document this as a warning?

from deck.js.

tlberglund avatar tlberglund commented on June 6, 2024

I will confess up front to not having looked at how you use replaceState(), therefore not knowing offhand the implications of removing it, but it seems like Chrome has now made it a dead letter, and not using it is the right thing to do. Unless this kind of API retreat becomes a massive trend and JavaScript from file:// URLs becomes practically impossible, I think the thin web server option is too complex. It's an extra moving part that will be a pain in the butt across platforms, having its own dependencies, etc.

If the alternatives to replaceState() end up ballooning history in weird ways or being unacceptable for other reasons, that's cool, but absent compelling considerations there I think nuking it is the right thing to do.

from deck.js.

adderek avatar adderek commented on June 6, 2024

Workaround:
Open deck.js, go to line ~340 and change
window.history.replaceStats({}, "", hashPath);
to
try{window.history.replaceStats({}, "", hashPath);}catch(err){if (!err.message.startsWith("Failed to execute 'replaceState' on 'History'")){throw new Error(err.message);}}

Note that it is a nasty fix. Better would be to handle only this specific error (but current chrome won't work with "instanceof SecurityError") and in case of any other error just throw it through...

from deck.js.

TheBox193 avatar TheBox193 commented on June 6, 2024

+1

from deck.js.

mjenkinsfuerst avatar mjenkinsfuerst commented on June 6, 2024

@tlberglund @sarperlman Can this be closed?

from deck.js.

tlberglund avatar tlberglund commented on June 6, 2024

Well, we don't have write access to this repo, so we can't close it ourselves, but good catch all the same! This was fixed in Chrome at some point in the past few months.

from deck.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.