-
Notifications
You must be signed in to change notification settings - Fork 91
Open
Description
Running into an issue with MS Edge on Windows 10.
Basically the IFrame children can't communicate with the parent, here is a working example.
File1: TestPage.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test Outside</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/intercom.js/0.1.4/intercom.min.js"></script>
<script type="text/javascript">
var intercom = Intercom.getInstance();
intercom.on('parent', function(data) {
document.getElementById("data").innerHTML = data.message;
});
setTimeout(function(){
intercom.emit('child', {message: 'Hello, Son!'});
}, 500);
</script>
</head>
<body>
<h1>Outside</h1>
<p id="data">Loading..</p>
<iframe src="/TestPage2.html"></iframe>
</body>
</html>File2: TestPage2.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test Inside</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/intercom.js/0.1.4/intercom.min.js"></script>
<script type="text/javascript">
var intercom = Intercom.getInstance();
intercom.emit('parent', {message: 'Hello, Dad!'});
intercom.on('child', function(data) {
document.getElementById("data").innerHTML = data.message;
});
</script>
</head>
<body>
<h1>Inside</h1>
<p id="data">Loading..</p>
</body>
</html>Metadata
Metadata
Assignees
Labels
No labels
