Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using URL object in safari #8726

Closed
dennererthal01 opened this issue Jul 31, 2017 · 6 comments
Closed

Error using URL object in safari #8726

dennererthal01 opened this issue Jul 31, 2017 · 6 comments

Comments

@dennererthal01
Copy link

Configuration:

  • Web browser and its version: Safari Version 10.1.1 (12603.2.4)
  • Operating system and its version: macOS Sierra Version 10.12.5
  • PDF.js version: 1.8.593
  • Is an extension: No

Steps to reproduce the problem:

  1. Include pdf.js on any html file and load that file
  2. Open developer console and paste the following code:
    new URL(location).searchParams.get('param')

What is the expected behavior?
The browser should check if the provided URL has the specified parameter (screenshot from Google Chrome).
screen shot 2017-07-31 at 12 44 03

What went wrong?
On safari, it changes the URL and redirects it, breaking the page.
screen shot 2017-07-31 at 12 44 40

@thibautsabot
Copy link

@dennererthal01 Did you fix your problem ?

I have the same issue but the fixing PR has been closed.

@dennererthal01
Copy link
Author

@GinjiBan currently I stopped using URL().searchParams, which seems to be the only method broken. I'm using both URLSearchParams() and URL().search.

@ghost
Copy link

ghost commented Oct 3, 2017

I'm a student at Seneca college learning open source, and I was hoping to work on this bug for my course. If no one else is currently working on it, I'd like to give it a try :)

@timvandermeij
Copy link
Contributor

@St3v3n-D Nobody indicated that they're working on it, so it's yours!

@rob-murray
Copy link

rob-murray commented Jan 12, 2018

This URL polyfill breaks some other parts of my application - my temporary work-around for this is to include another polyfill after pdf.js is required so older browsers (and safari) are polyfilled twice but end up with a working version!

@timvandermeij
Copy link
Contributor

Fixed by #9868.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants