Git Product home page Git Product logo

Comments (6)

lifaon74 avatar lifaon74 commented on August 26, 2024 1

I don't have Safari on the hand. Could you fix it on your side, run the tests and create a pull request please ?

from url-polyfill.

supperchong avatar supperchong commented on August 26, 2024

I find the same problem.When I use url-polyfill and pdfjs-dist in my web,the url-polyfill will lose efficacy. Because pdf-dist use this code to check if URL is valid.
if (typeof URL === 'function' && _typeof(URL.prototype) === 'object' && 'origin' in URL.prototype) { var u = new URL('b', 'http://a'); u.pathname = 'c%20d'; hasWorkingUrl = u.href === 'http://a/c%20d'; }
But in safari,
u.href==='http://a/c%2520d'
And then the pdfjs-dist will rewrite URL.But the module doesn't achieve the searchParams method.fortunately the pdfjs-dist have Stop exposing the URL polyfill in the global scope.

More over ,If this is a bug ? url-polyfill use this code to check URL is supported.But after execute the module .The check is false also in safari.
var checkIfURLIsSupported = function() { try { var u = new URL('b', 'http://a'); u.pathname = 'c%20d'; return (u.href === 'http://a/c%20d') && u.searchParams; } catch(e) { return false; } };

from url-polyfill.

moshest avatar moshest commented on August 26, 2024

Currently looks like everything works fine (Safari 12.1.1):

Screen Shot 2019-07-14 at 19 10 51

from url-polyfill.

janicklas-ralph avatar janicklas-ralph commented on August 26, 2024

This is still an issue in Safari 10. Any idea what should be the fix?

from url-polyfill.

lifaon74 avatar lifaon74 commented on August 26, 2024

@janicklas-ralph I dont have any Safari on the hand, could you please fork the project, fix the bug, and then do a pull request ?

from url-polyfill.

lifaon74 avatar lifaon74 commented on August 26, 2024

Ok, version 1.1.8 released. Tell if everything is OK

from url-polyfill.

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.