Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getDefaultFoundation() {
this.menuEl_ = this.root_.querySelector('.mdc-select__menu')
// prettier-ignore
return new MDCSelectFoundation({
addClass: helper.addClass('rootProps', this),
removeClass: helper.removeClass('rootProps', this),
setAttr: helper.setAttr('rootProps', this),
rmAttr: helper.rmAttr('rootProps', this),
computeBoundingRect: () => this.root_.getBoundingClientRect(),
// Don't use rootProps here for Event bubbling
registerInteractionHandler: (type, handler) => this.root_.addEventListener(type, handler),
deregisterInteractionHandler: (type, handler) => this.root_.removeEventListener(type, handler),
focus: () => this.root_.focus(),
makeTabbable: helper.setAttr('rootProps', this, 'tabIndex', 0),
makeUntabbable: helper.setAttr('rootProps', this, 'tabIndex', -1),
getComputedStyleValue: propertyName => window.getComputedStyle(this.root_).getPropertyValue(propertyName),
setStyle: (propertyName, value) => this.root_.style.setProperty(propertyName, value),
create2dRenderingContext: () => document.createElement('canvas').getContext('2d'),
setMenuElStyle: (propertyName, value) => this.menuEl_.style.setProperty(propertyName, value),
setMenuElAttr: helper.setAttr('menuProps', this),