Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
findContainerWidth() {
var containerWidth, style;
containerWidth = 0;
let element = this.element;
while (isElement((element = element != null ? element.parentNode : void 0)) && !containerWidth) {
style = this.window ? this.window.getComputedStyle(element) : '';
if (!/^inline/.test(style.display)) {
containerWidth = Util.width(element);
}
}
return Math.round(containerWidth);
};