Skip to content
Snippets Groups Projects
parent.ts 460 B
Newer Older
  • Learn to ignore specific revisions
  • import { resizeIframe, toggleIframe } from "./iframe";
    import { loadStartButton } from "./load";
    
    Midhun Suresh's avatar
    Midhun Suresh committed
    import "./parent-style.css";
    
    (window as any).isIframeLoaded = false;
    
    Midhun Suresh's avatar
    Midhun Suresh committed
    
    window.addEventListener("message", event => {
        const { action } = event.data;
        switch (action) {
            case "resize-iframe":
    
                resizeIframe(event.data);
    
    Midhun Suresh's avatar
    Midhun Suresh committed
                break;
            case "minimize":
    
                toggleIframe();
    
    Midhun Suresh's avatar
    Midhun Suresh committed
                break;
        }
    });
    
    
    loadStartButton();