Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getDefaultFoundation() {
// prettier-ignore
return new MDCDialogFoundation({
addClass: helper.addClass('rootProps', this),
removeClass: helper.removeClass('rootProps', this),
addBodyClass: helper.addClass(document.body),
removeBodyClass: helper.removeClass(document.body),
eventTargetHasClass: helper.eventTargetHasClass(),
registerInteractionHandler: helper.registerHandler('rootProps', this),
deregisterInteractionHandler: helper.deregisterHandler('rootProps', this),
registerSurfaceInteractionHandler: helper.registerHandler('surfaceProps', this),
deregisterSurfaceInteractionHandler: helper.deregisterHandler('surfaceProps', this),
registerDocumentKeydownHandler: helper.registerHandler(document, 'keydown'),
deregisterDocumentKeydownHandler: helper.deregisterHandler(document, 'keydown'),
registerTransitionEndHandler: helper.registerHandler('surfaceProps', this, 'transitionend'),
deregisterTransitionEndHandler: helper.deregisterHandler('surfaceProps', this, 'transitionend'),
notifyAccept: () => {
this.props.onAccept()
this.props.onAccept_()
constructor(props) {
super(props);
this.adapter = new FoundationAdapter();
this.foundation = new MDCDialogFoundation(this.adapter.toObject());
}