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

Fix: Use correct base URL in getElementByUrl #2148

merged 1 commit into from Apr 2, 2019


None yet
3 participants
Copy link

commented Apr 1, 2019

Pull request checklist

Make sure you:

For non-trivial changes, please make sure you also:

  • Added/Updated related documentation.
  • Added/Updated related tests.

Short description of the change(s)

Use the base URL of the document to resolve relative URLs for finding elements, not the URL that was requested.

Fix unhandled errors cause by trying to resolve relative URLs against data-uris.
Also fix not found elements due to relative URLs being resolved against the wrong path.

@antross antross requested review from molant and sarvaje as code owners Apr 1, 2019

Copy link

left a comment

Should we have a test for this? Seems pretty important to messes it again and we have the node api refactor coming soon 🤔


This comment has been minimized.

Copy link
Member Author

commented Apr 1, 2019

Should we have a test for this?

Probably a good idea. I'll add one.

@antross antross referenced this pull request Apr 1, 2019


Chore: Migrate browser extension to React #2140

3 of 3 tasks complete

@antross antross force-pushed the antross:fix/element-base-url branch from 7b9aabc to e2194a0 Apr 1, 2019


sarvaje approved these changes Apr 2, 2019


molant approved these changes Apr 2, 2019

@molant molant merged commit bff5155 into webhintio:master Apr 2, 2019

3 of 5 checks passed

webhintio.hint Build #20190401.19 failed
webhintio.hint (macOS_PR node_11_x) macOS_PR node_11_x was canceled
licence/cla Contributor License Agreement is signed.
webhintio.hint (Linux_PR node_11_x) Linux_PR node_11_x succeeded
webhintio.hint (Windows_PR node_11_x) Windows_PR node_11_x succeeded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.