Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
protected async createFoundation() {
if (this.lineRippleElement) {
this.createLineRippleFoundation();
}
if (this.outlineElement) {
this.createNotchedOutlineFoundation();
}
if (this.mdcFoundation !== undefined) {
this.mdcFoundation.destroy();
}
this._characterCounter = this.charCounterElement ? new MDCTextFieldCharacterCounter(this.charCounterElement) : null;
this.mdcFoundation = new this.mdcFoundationClass(this.createAdapter(), {
characterCounter: this._characterCounter ? this._characterCounter.foundation : undefined
});
if (this.labelElement) {
await this.labelElement.updateComplete;
}
this.mdcFoundation.init();
}