Last Updated: February 25, 2016
·
2.665K
· versae

document.location.origin does only exist in webkit browsers

The alternative is to use window.location.protocol + "//" + window.location.host

I found this when working with postMessage.

1 Response
Add your response

Just what I needed, thanks!

over 1 year ago ·