Last active
January 31, 2019 20:39
-
-
Save mrfolkblues/2fae74f55bd9ca4f16d564fb62e100f0 to your computer and use it in GitHub Desktop.
window.location.origin Polyfill
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!window.location.origin) { | |
window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: ''); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://blogs.msdn.com/b/ieinternals/archive/2011/02/28/internet-explorer-window-location-pathname-missing-slash-and-host-has-port.aspx