mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
ignore SecurityError exception if opener is different security context / cross-origin
This commit is contained in:
parent
911e7d2955
commit
0092addd08
@ -86,12 +86,21 @@
|
||||
// check for a framework object
|
||||
if (typeof window.framework == 'undefined')
|
||||
{
|
||||
try {
|
||||
// try finding it in top or opener's top
|
||||
if (window.opener && typeof window.opener.top.framework != 'undefined')
|
||||
{
|
||||
window.framework = window.opener.top.framework;
|
||||
if (debug) console.log('found framework object in opener top');
|
||||
}
|
||||
}
|
||||
catch(e) {
|
||||
// ignore SecurityError exception if opener is different security context / cross-origin
|
||||
}
|
||||
if (typeof window.framework != 'undefined')
|
||||
{
|
||||
// set in above try block
|
||||
}
|
||||
else if (window.top && typeof window.top.framework != 'undefined')
|
||||
{
|
||||
window.framework = window.top.framework;
|
||||
|
Loading…
Reference in New Issue
Block a user