Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getDefaultFoundation() {
return new MDCGridListFoundation({
getOffsetWidth: () => this.root_.offsetWidth,
getNumberOfTiles: () => {
return this.root_.querySelectorAll(MDCGridListFoundation.strings.TILE_SELECTOR).length;
},
getOffsetWidthForTileAtIndex: (index) => {
return this.root_.querySelectorAll(MDCGridListFoundation.strings.TILE_SELECTOR)[index].offsetWidth;
},
setStyleForTilesElement: (property, value) => {
this.root_.querySelector(MDCGridListFoundation.strings.TILES_SELECTOR).style[property] = value;
},
registerResizeHandler: (handler) => this.window.addEventListener('resize', handler),
deregisterResizeHandler: (handler) => this.window.removeEventListener('resize', handler),
});
}