Comments (6)
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.
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.
Currently looks like everything works fine (Safari 12.1.1):
from url-polyfill.
This is still an issue in Safari 10. Any idea what should be the fix?
from url-polyfill.
@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.
Ok, version 1.1.8 released. Tell if everything is OK
from url-polyfill.
Related Issues (20)
- Error parsing params values with = HOT 1
- Constructor should throw when no base is given for relative URLs HOT 1
- Creating `new URLSearchParams()` throws error in ie11 HOT 2
- Polyfill broken in V1.1.X HOT 6
- 【feature-umd bundle】 Support import instead of changing global objects HOT 1
- Error parsing invalid URL HOT 8
- URLSearchParams and URL referenced globally instead of as properties of 'global' parameter HOT 2
- TypeError: Cannot read property 'apply' of undefined HOT 6
- [Question]What's the difference between this repo and ... HOT 1
- Failed to create URL with base address contained port 80 HOT 2
- Tag releases HOT 2
- URLSearchParams with multiple question marks not parsed correctly HOT 1
- Construction using window.location.href as base throws Invalid URL HOT 5
- Add tests for #54
- "Invalid Argument" on "new URLSearchParams(formData.entries())" in Edge 44.18362.449.0 HOT 3
- not working in nativescript
- URLSearchParams entries not supported on some versions of firefox HOT 4
- 'base' argument is not stringified HOT 1
- 'URLSearchParams' is undefined (Edge 14-16)
- IE11 object missing most fields HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from url-polyfill.