Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

including a page to <dialog> #46

Closed
mohsin25 opened this issue Apr 20, 2015 · 3 comments
Closed

including a page to <dialog> #46

mohsin25 opened this issue Apr 20, 2015 · 3 comments

Comments

@mohsin25
Copy link

Can we include a page to ? We are using showModalDialog by adding a page from URL, can we do same here?

@mfalken
Copy link
Contributor

mfalken commented Apr 22, 2015

You cannot directly do that, as it's not part of the <dialog> spec. Dialog exists inside a document, it isn't a separate document like showModalDialog was. Maybe the best way would be to put an <iframe> in a <dialog>.

@mohsin25
Copy link
Author

Matto, thanks a lot for you reply. I have another confusion please help me in clearing it. Our clients use our application on Internet explorer and firefox. dialog tag is not supported on both as mentioned on w3schools. Some websites say dialog tag will not be the part of HTML 5 specification. Now I am confused should I use this polyfill? If in future these two browsers do not support dialog tag than where will I stand. Our application has around 1000 modal dialogs so what should I do?

@mfalken
Copy link
Contributor

mfalken commented Apr 23, 2015

The point of the polyfill is to allow you to use <dialog> in browsers that don't implement it. So today you can use <dialog> natively where available and then fallback to the polyfill for other browsers.

Ideally, you would never need the polyfill. Currently <dialog> is supported in Chrome and Opera but not other browsers. I've seen positive signals from other browsers but it's unknown when they will add support. For example, Firefox has a bug you can follow; they've also have good developer documentation.

The state of HTML specifications takes some time to explain. The short answer is yes, it is in the HTML spec. The longer answer is, the WHATWG HTML spec has dialog, and the W3C HTML 5.1 spec also has dialog. The W3C decided to put it in HTML 5.1 rather than HTML 5 because of lack of browser support at the time.

@samthor samthor closed this as completed Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants