Skip to content

Parse location.href with an anchor for IE #1049

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

Merged
merged 2 commits into from
Dec 12, 2014
Merged

Parse location.href with an anchor for IE #1049

merged 2 commits into from
Dec 12, 2014

Conversation

btoews
Copy link

@btoews btoews commented Dec 11, 2014

This is a follow up to #1046. It turns out that IE always adds the port to window.location.host, but not to a.host. This doesn't show up in tests because they are run on port 3000, so the port is always present in a.host too.

@@ -193,7 +196,8 @@
if (!settings.crossDomain) {
urlAnchor = document.createElement('a')
urlAnchor.href = settings.url
settings.crossDomain = (window.location.protocol + '//' + window.location.host) !== (urlAnchor.protocol + '//' + urlAnchor.host)
urlAnchor.href = urlAnchor.href
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IE is great!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You know, that explanation could have gone in the commit message instead of as a screenshot in a line note ;) http://mislav.uniqpath.com/2014/02/hidden-documentation/

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can open another PR for a comment if you'd like 😄

mislav added a commit that referenced this pull request Dec 12, 2014

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Parse location.href with an anchor for IE
@mislav mislav merged commit 76e4233 into madrobby:master Dec 12, 2014
@mislav
Copy link
Collaborator

mislav commented Dec 12, 2014

Thanks for the update!

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

Successfully merging this pull request may close these issues.

None yet

3 participants