Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function hideDialog(action = '') {
this.isOpen_ = false;
this.adapter_.addClass(MDCDialogFoundation.cssClasses.CLOSING);
this.adapter_.removeClass(MDCDialogFoundation.cssClasses.OPEN);
this.adapter_.removeBodyClass(MDCDialogFoundation.cssClasses.SCROLL_LOCK);
cancelAnimationFrame(this.animationFrame_);
this.animationFrame_ = 0;
clearTimeout(this.animationTimer_);
this.animationTimer_ = setTimeout(() => {
this.adapter_.releaseFocus();
this.handleAnimationTimerEnd_();
this.adapter_.notifyClosed(action);
}, MDCDialogFoundation.numbers.DIALOG_ANIMATION_CLOSE_TIME_MS);
}