I got a trick working as follows: [have not tested cross-browser!]
Define iframe's onload event handler defined as
$('#myIframe').on('load', function() {_x000D_
setTimeout(function() {_x000D_
try {_x000D_
console.log($('#myIframe')[0].contentWindow.document);_x000D_
} catch (e) {_x000D_
console.log(e);_x000D_
if (e.message.indexOf('Blocked a frame with origin') > -1 || e.message.indexOf('from accessing a cross-origin frame.') > -1) {_x000D_
alert('Same origin Iframe error found!!!');_x000D_
//Do fallback handling if you want here_x000D_
}_x000D_
}_x000D_
}, 1000);_x000D_
_x000D_
});
_x000D_
Disclaimer: It works only for SAME ORIGIN IFRAME documents.