GoogleChrome / dialog-polyfill

Polyfill for the HTML dialog element
BSD 3-Clause "New" or "Revised" License
2.45k stars 245 forks source link

any possibility to display over frameset? #207

Open milichev opened 4 years ago

milichev commented 4 years ago

I assume, it's not possible but still, is it possible to display a dialog over frameset structure like so?

<html>
    <head>
        <title><%=g_title%></title>     
        <% import_dialog_polyfill 0 %>
    </head>
    <frameset framespacing="1" border="0" frameborder="0" rows="56,*">
        <frame scrolling="no" noresize src="banner.asp">
        <frameset cols="240,*" frameborder="1">
            <frame scrolling="auto" src="entry_nav.asp">
            <!-- another ugly frame stacks go here -->
        </frameset>
    </frameset>

    <dialog>
        Dialog content
    </dialog>

    <script>
    // initialize and show the dialog
    </script>
</html>

This way, the dialog is initialized and present in DOM but is not visible.

samthor commented 4 years ago

Now that's a HTML element I've not seen in a long time, <frameset>. Is there a problem whereby the frameset is always visually in front of the dialog?

techboyg5 commented 4 years ago

If you need a frameset, the only way you could put ANYTHING over the whole frameset is to put the frameset inside of its own iframe.

Then you can put the dialog outside of the iframe. And you could initialize the dialog within a frame by using window.top.

However, I'd recommend migrating to Ajax instead.