Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
MDCSelect.prototype.enhancedSelectSetup_ = function (menuFactory) {
var isDisabled = this.root_.classList.contains(cssClasses.DISABLED);
this.selectedText_.setAttribute('tabindex', isDisabled ? '-1' : '0');
this.hiddenInput_ = this.root_.querySelector(strings.HIDDEN_INPUT_SELECTOR);
this.menuElement_ = this.root_.querySelector(strings.MENU_SELECTOR);
this.menu_ = menuFactory(this.menuElement_);
this.menu_.hoistMenuToBody();
this.menu_.setAnchorElement(this.root_);
this.menu_.setAnchorCorner(menuSurfaceConstants.Corner.BOTTOM_START);
this.menu_.wrapFocus = false;
};
MDCSelect.prototype.createRipple_ = function () {
private enhancedSelectSetup_(menuFactory: MDCMenuFactory) {
const isDisabled = this.root_.classList.contains(cssClasses.DISABLED);
this.selectedText_!.setAttribute('tabindex', isDisabled ? '-1' : '0');
this.hiddenInput_ = this.root_.querySelector(strings.HIDDEN_INPUT_SELECTOR);
this.menuElement_ = this.root_.querySelector(strings.MENU_SELECTOR)!;
this.menu_ = menuFactory(this.menuElement_);
this.menu_.hoistMenuToBody();
this.menu_.setAnchorElement(this.root_);
this.menu_.setAnchorCorner(menuSurfaceConstants.Corner.BOTTOM_START);
this.menu_.wrapFocus = false;
}
enhancedSelectSetup_(menuFactory) {
const isDisabled = this.root_.classList.contains(cssClasses.DISABLED);
this.selectedText_.setAttribute('tabindex', isDisabled ? '-1' : '0');
this.hiddenInput_ = this.root_.querySelector(strings.HIDDEN_INPUT_SELECTOR);
this.menuElement_ = /** @type {HTMLElement} */ (this.root_.querySelector(strings.MENU_SELECTOR));
this.menu_ = menuFactory(this.menuElement_);
this.menu_.hoistMenuToBody();
this.menu_.setAnchorElement(/** @type {!HTMLElement} */ (this.root_));
this.menu_.setAnchorCorner(menuSurfaceConstants.Corner.BOTTOM_START);
this.menu_.wrapFocus = false;
}