Giter Site home page Giter Site logo

de.serlo.org doesn't work on iOS about athene2 HOT 8 CLOSED

serlo avatar serlo commented on August 21, 2024
de.serlo.org doesn't work on iOS

from athene2.

Comments (8)

aeneasr avatar aeneasr commented on August 21, 2024

could be caused by cloudflare

from athene2.

aeneasr avatar aeneasr commented on August 21, 2024

this is reproducible when using the ios simulator and the latest iphone

from athene2.

aeneasr avatar aeneasr commented on August 21, 2024

It looks like this was caused by webcomponents.js, which has been solve here: 17484c9

from athene2.

nazar-pc avatar nazar-pc commented on August 21, 2024

CloudFlare passes window.location object to window.URL constructor while constructor accepts only strings, which is why https://github.com/webcomponents/webcomponentsjs/blob/c9bceeedb4077b5658d95f5755883592be92fcaf/src/URL/URL.js#L473 works very differently and causes this error, meaning redirect to another page instead of string replace.

CloudFlare already notified about this, hope they'll fix it soon.

from athene2.

aeneasr avatar aeneasr commented on August 21, 2024

Thanks for tracking this down!!

from athene2.

terinjokes avatar terinjokes commented on August 21, 2024

@nazar-pc this still doesn't make sense, just a few lines beforehand the base property is stringified and converted to a jURL instance.

https://github.com/webcomponents/webcomponentsjs/blob/c9bceeedb4077b5658d95f5755883592be92fcaf/src/URL/URL.js#L468

from athene2.

nazar-pc avatar nazar-pc commented on August 21, 2024

@terinjokes, regexp works with url variable, base is not relevant there.

from athene2.

terinjokes avatar terinjokes commented on August 21, 2024

@nazar-pc I fixed this a while ago, but just came across this thread, I forgot what I was doing. Sorry, carry along. :)


The code that was failing on CloudFlare was a feature detection check to see if the URL constructor exists and works. It does this by passing in window.location (and now window.location.href) as the first parameter to the URL constructor, and checking the output.

If the URL constructor exists and works, then throughout the codebase, the URL constructor is passed two arguments, url and base, and I'm accustom to base often being window.location (now window.location.href).

For a moment after reading this thread, I thought the issue was in this latter case, rather than the former, thus the confusion.

from athene2.

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.