Created
November 2, 2015 18:16
-
-
Save brenopolanski/cddfa70b8cb125789638 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