Skip to content

Instantly share code, notes, and snippets.

@Dobby89
Dobby89 / gist:b543cec9b97be6d16e9425989f1b7335
Last active November 11, 2020 08:16 — forked from jaydson/gist:1780598
How to detect a click event on a cross domain iframe
var iframeMouseOver = false;
window.addEventListener('blur',function(){
if(iframeMouseOver){
console.log('Wow! Iframe Click!');
}
});
document.getElementById('YOUR_CONTAINER_ID').addEventListener('mouseover',function(){
iframeMouseOver = true;