3
The "window.showModalDialog" function exists in some versions of IE, but does not exist in Chrome, I would like to insert it if it does not exist. How can I do that?
window.showModalDialog = function (arg1, arg2, arg3) {
//Minha função
}
3
The "window.showModalDialog" function exists in some versions of IE, but does not exist in Chrome, I would like to insert it if it does not exist. How can I do that?
window.showModalDialog = function (arg1, arg2, arg3) {
//Minha função
}
3
This functionality is not standardized, is deprecated, and should be avoided.
I think you pose different questions here, and interesting to separate.
You can detect if the function exists and if it does not exist apply a function of yours with similar behavior. Something like:
if (!window.showModalDialog) window.showModalDialog = function(){
// etc ...
That exists now and you can find it on Github here: https://github.com/niutech/showModalDialog
TO MDN also points out to that repository you have a demo here.
Browser other questions tagged javascript
You are not signed in. Login or sign up in order to post.