    
<!DOCTYPE html>
<html>
<head>
    <title>Viewer</title>
        <style type="text/css">
            body, html
            {
                margin: 0; padding: 0; height: 100%; overflow: hidden;
            }

            #viewer
            {
                position:absolute; left: 0; right: 0; bottom: 0; top: 0px; 
            }
        </style>
</head>
<body>
    <p>Awating load request</p>
    This page will display series when loaded from other pages.
    <iframe id="viewer" style="width: 100%; height: 100%; border: none; padding: 0px;" ></iframe>

    <script type="text/javascript">
        var win2 = false;

        document.addEventListener("DOMContentLoaded", function() {
            document.title = "Case: {{current_case.title}}";
            console.log('ready');
            const bc = new BroadcastChannel("viva_load");
            bc.onmessage = (event) => {
                console.log("message received");
                console.log(event);
                if (event.data.type == "open") {
                    document.getElementById("viewer").src = event.data.url;
                    //document.querySelectorAll("[data-cy='seriesList-btn']")[0].click()
                    bc.postMessage({"type": "open-complete", "url" : event.data.url});
                }
            };
        });
    </script>

</body>
</html>
