I run a function that should close the Dojo dialog if it is loaded. How to check if the Dojo dialog works? I use pure JavaScript and check by id if it is undefined?
if (dijit.byId("blah") !== undefined) { destroyRecursive dijit; }
Or I use a property of a dialog object, for example:
isFocusable method isLoaded property
The dialog provides two properties that you can check: isLoadedand open. Digging through the code, you will find the following descriptions:
isLoaded
open
, :
var dialog = dijit.byId("blah"); if( dialog.open ) { dialog.destroy(); }
?
/ , :
var dialog = dijit.byId('blah'); if (dialog) { if (dialog.open) { dialog.hide(); } else { dialog.show(); } }
var dialog = dijit.byId('blah'); dialog.destory();
, destroy , destroy, - dijit.layout.ContentPane.
destroy
dijit.layout.ContentPane