javascript - Testing for parent window protocol in Opera -
I am trying to find out the protocol used by an original window in a child window. If I use window.opener.location.protocol, then it works in everything (IE8, FF3.5.5, Safari 4.0.0, Chrome 4) except Opera. In Opera:
Message: Security Error: Attempted to read Protected Variable 'Protocol'
It worked fine in Opera, but I It seems that he changed it. I'm using Opera 10.10. Is there any way to test the protocol, or even to determine whether the parent window is the same place and protocol as a child?
You should get an error when the protocol is different.
In other words:
var is parentSecure; Try {isParentSecure = window.opener.location.protocol === 'https'; Hold (e) {isParentSecure = window.location.protocol! == 'https'; }
I have not actually tested it.
Comments
Post a Comment