Commit 7c78c3ab authored by sgalinsk's avatar sgalinsk

[BUGFIX] Catch domain access security exceptions in the iframe player

Fixes: #58671


git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/pmkshadowbox/trunk@85413 735d13b6-9817-0410-8766-e36946ffe9aa
parent 99cd0baa
......@@ -100,14 +100,18 @@ S.iframe.prototype = {
iframeInstance = this;
}
var win = window.frames[iframeInstance.id];
if (typeof win !== 'undefined') {
if (win.document.body === null) {
window.setTimeout(function(){iframeInstance.triggerResize(iframeInstance)}, 10);
} else {
var dims = setDimensions(iframeInstance.height, iframeInstance.width);
iframeInstance.onWindowResize(dims);
try {
var win = window.frames[iframeInstance.id];
if (typeof win !== 'undefined') {
if (win.document.body === null) {
window.setTimeout(function(){iframeInstance.triggerResize(iframeInstance)}, 10);
} else {
var dims = setDimensions(iframeInstance.height, iframeInstance.width);
iframeInstance.onWindowResize(dims);
}
}
} catch (e) {
// catches e.g. security exceptions if the iframe content is not in the same domain
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment