Close specified popup and any popups that it parented
Usage
function (popup) (view source)
while(dojo.some(stack, function(elem){return elem.widget == popup;})){var top = stack.pop(),
wrapper = top.wrapper,
iframe = top.iframe,
widget = top.widget,
onClose = top.onClose;
if(widget.onClose){
widget.onClose();
}
dojo.forEach(top.handlers, dojo.disconnect);
// #2685: check if the widget still has a domNode so ContentPane can change its URL without getting an errorif(!widget||!widget.domNode){return; }this.prepare(widget.domNode);
iframe.destroy();
dojo._destroyElement(wrapper);
if(onClose){
onClose();
}}