Coder Social home page Coder Social logo

Comments (9)

EnixCoda avatar EnixCoda commented on May 14, 2024 1

It works! Thank you so much!

Now I can release next version of Gitako and users will have better user experiences!

If you use GitHub frequently, please give a try :P

https://github.com/EnixCoda/Gitako

from pjax-api.

falsandtru avatar falsandtru commented on May 14, 2024

I fixed cross-origin access only about window.history.state. Is there another illegal access?

e.g. assigning variables to properties of window.location

If you actually get that error, can you also show me it and its call stack?

from pjax-api.

EnixCoda avatar EnixCoda commented on May 14, 2024

Thank you for fast responding!

Here are screenshots of each level of the call stack, top down.

image

image

image

image

It looks like that the issue happens when assigning position to window.history.state?

from pjax-api.

falsandtru avatar falsandtru commented on May 14, 2024

OK, it should be fixed at v3.31.1. Can you confirm it?

from pjax-api.

EnixCoda avatar EnixCoda commented on May 14, 2024

It's not :(

The issue occurs in savePosition while your changes updated mutations on state in functions except it.

savePosition is still mutating on cross origin state.

export function savePosition(): void {
void window.history.replaceState(
extend<Pick<State, State.position>>(
window.history.state || {},
{
position: {
top: window.pageYOffset,
left: window.pageXOffset
}
}),
document.title);

from pjax-api.

EnixCoda avatar EnixCoda commented on May 14, 2024

Sorry, I missed later commits in which you fixed savePosition.

But the issue does still exist after I updated pjax-api. I'll remove local cache and give another try ASAP.

from pjax-api.

EnixCoda avatar EnixCoda commented on May 14, 2024

The cross-origin issue has been fixed successfully! 🍻

...and another occurred - TypeError: can't prevent extensions on this proxy object

It is an issue of URL.

Call stacks

image
image
image
image
image
image

The direct reason

image

I did some dig on it (see the console). It seems that the reason is Object.freeze failed on URL instances.

from pjax-api.

falsandtru avatar falsandtru commented on May 14, 2024

OK, I'll remove Object.freeze.

from pjax-api.

falsandtru avatar falsandtru commented on May 14, 2024

Fixed at v3.31.2.

from pjax-api.

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.