code: function(base) {
  				var dfd = $.Deferred(),
  					ab = 'about:blank';
  				base.src = ab;
  				setTimeout(function() {
  					var src;
  					try {
  						src = base.contentWindow.location.href;
  					} catch(e) {
  						src = null;
  					}
  					if (src === ab) {
  						dfd.resolve();
  					} else {
  						dfd.reject();
  					}
  				}, 100);
  				return dfd;
  			}
docs: Before dialog close