Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then(() => new this._viewClasses.SelectView(this, this._model,
this._screens.select, this._animationHelper));
this._settingsViewPromise = import('./views/settings.js')
.then((module) => this._viewClasses.SettingsView = module.SettingsView)
.then(() => this._booted)
.then(() => new this._viewClasses.SettingsView(this, this._model,
this._screens.settings, this._animationHelper));
this._booted.then(() => this._hideLoadingScreen());
// MDC-Web component init.
MDCRipple.attachTo(document.querySelector('.mm-convert__update'));
const menu =
new MDCSimpleMenu(document.querySelector('.mdc-toolbar__menu'));
this._snackbar = new MDCSnackbar(document.querySelector('.mm-snackbar'));
// Add event listener to button to toggle the menu on and off.
this._elements.more.addEventListener('click', () =>
this._booted.then(() => (menu.open = !menu.open)));
// Add event listener to open Settings screen.
document.querySelector('.mm-menu__settings').addEventListener('click',
() => this._settingsViewPromise.then((view) => {
view.show(this._screens.convert);
history.pushState({page: 'settings'}, 'Settings');
}));
const ratesDialog =
new MDCDialog(document.querySelector('#mm-rates-dialog'));
initialize(menuFactory = (el) => new MDCSimpleMenu(el)) {
this.menuEl_ = this.root_.querySelector('.mdc-select__menu');
componentDidMount() {
this.MDComponent = new MDCSimpleMenu(this.control);
}
componentWillUnmount() {