Skip to content

Issue with IFrames and MS Edge #16

@PaitoAnderson

Description

@PaitoAnderson

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.

IE11 on Windows 7:
image

MS Edge on Windows 10:
capture

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions