Last active
August 29, 2015 14:26
-
-
Save FrankFang/e9bd8d1ba20e34f7aa4b to your computer and use it in GitHub Desktop.
window.location.origin IE fix
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) { // Some browsers (mainly IE) does not have this property, so we need to build it manually... | |
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