MediaWiki talk:Gadget-wikidialog.js

Instructions for javascript use of this module
If a dialog action generates new page content that may contain dialog fields or buttons, its page-specific javascript should then invoke this code, importing if necessary. Asynchronously, if (('wikidialog' in window) && ('show' in window.wikidialog)) window.wikidialog.show; else $.getScript( // MediaWiki:Gadget-wikidialog.js        mw.config.get('wgScript') + '?title=' + mw.util.wikiUrlencode('MediaWiki:Gadget-wikidialog.js') +                                     '&action=raw&ctype=text/javascript'     ); If additional code needs to be executed after calling window.wikidialog.show, use either a named callback, function callback { ... } if (('wikidialog' in window) && ('show' in window.wikidialog)) callback; else $.getScript( // MediaWiki:Gadget-wikidialog.js]        mw.config.get('wgScript') + '?title=' + mw.util.wikiUrlencode('MediaWiki:Gadget-wikidialog.js') +                                     '&action=raw&ctype=text/javascript',         callback;     ); or an unnamed callback, function wikidialogShow(callback) {    if (('wikidialog' in window) && ('show' in window.wikidialog)) {        window.wikidialog.show;        if (callback) callback;    }    else $.getScript( // [[MediaWiki:Gadget-wikidialog.js        mw.config.get('wgScript') + '?title=' + mw.util.wikiUrlencode('MediaWiki:Gadget-wikidialog.js') +                                    '&action=raw&ctype=text/javascript',        function  {            if (callback) callback;        }    );

wikidialogShow(function { ... });

Dialog installation
See MediaWiki talk:Dialog/receive.