diff --git a/packages/mdc-checkbox/foundation.js b/packages/mdc-checkbox/foundation.js index 7664aca45f2..716995d1fdd 100644 --- a/packages/mdc-checkbox/foundation.js +++ b/packages/mdc-checkbox/foundation.js @@ -80,6 +80,7 @@ class MDCCheckboxFoundation extends MDCFoundation { () => this.handleChange()); } + /** @override */ init() { this.currentCheckState_ = this.determineCheckState_(this.getNativeControl_()); this.updateAriaChecked_(); @@ -88,6 +89,7 @@ class MDCCheckboxFoundation extends MDCFoundation { this.installPropertyChangeHooks_(); } + /** @override */ destroy() { this.adapter_.deregisterChangeHandler(this.changeHandler_); this.uninstallPropertyChangeHooks_(); diff --git a/packages/mdc-ripple/foundation.js b/packages/mdc-ripple/foundation.js index bd5d6edffbc..4f97c573e71 100644 --- a/packages/mdc-ripple/foundation.js +++ b/packages/mdc-ripple/foundation.js @@ -194,6 +194,7 @@ class MDCRippleFoundation extends MDCFoundation { }; } + /** @override */ init() { if (!this.isSupported_()) { return; @@ -211,6 +212,7 @@ class MDCRippleFoundation extends MDCFoundation { }); } + /** @override */ destroy() { if (!this.isSupported_()) { return; diff --git a/packages/mdc-ripple/index.js b/packages/mdc-ripple/index.js index 46cfe17c249..d2233d840b0 100644 --- a/packages/mdc-ripple/index.js +++ b/packages/mdc-ripple/index.js @@ -114,11 +114,15 @@ class MDCRipple extends MDCComponent { this.foundation_.layout(); } - /** @return {!MDCRippleFoundation} */ + /** + * @return {!MDCRippleFoundation} + * @override + */ getDefaultFoundation() { return new MDCRippleFoundation(MDCRipple.createAdapter(this)); } + /** @override */ initialSyncWithDOM() { this.unbounded = 'mdcRippleIsUnbounded' in this.root_.dataset; }