Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setNativeControlAttr: (attr, value) => {
this.$refs.control.setAttribute(attr, value);
},
removeNativeControlAttr: attr => {
this.$refs.control.removeAttribute(attr);
},
isIndeterminate: () => this.$refs.control.indeterminate,
isChecked: () => this.$refs.control.checked,
hasNativeControl: () => true,
setNativeControlDisabled: disabled =>
(this.$refs.control.disabled = disabled),
forceLayout: () => this.$refs.root.offsetWidth,
isAttachedToDOM: () => true,
};
this.foundation = new MDCCheckboxFoundation(adapter);
this.handleAnimationEnd_ = () => this.foundation.handleAnimationEnd();
this.$el.addEventListener(
getCorrectEventName(window, 'animationend'),
this.handleAnimationEnd_,
);
this.installPropertyChangeHooks_();
this.ripple = new RippleBase(this, {
isUnbounded: () => true,
isSurfaceActive: () => RippleBase.isSurfaceActive(this.$refs.control),
registerInteractionHandler: (evt, handler) => {
this.$refs.control.addEventListener(evt, handler, applyPassive());
},
setNativeControlAttr: (attr, value) => {
this.$refs.control.setAttribute(attr, value);
},
removeNativeControlAttr: attr => {
this.$refs.control.removeAttribute(attr);
},
isIndeterminate: () => this.$refs.control.indeterminate,
isChecked: () => this.$refs.control.checked,
hasNativeControl: () => true,
setNativeControlDisabled: disabled =>
(this.$refs.control.disabled = disabled),
forceLayout: () => this.$refs.root.offsetWidth,
isAttachedToDOM: () => true,
};
this.foundation = new MDCCheckboxFoundation(adapter);
this.handleAnimationEnd_ = () => this.foundation.handleAnimationEnd();
this.$el.addEventListener(
getCorrectEventName(window, 'animationend'),
this.handleAnimationEnd_,
);
this.installPropertyChangeHooks_();
this.ripple = new RippleBase(this, {
isUnbounded: () => true,
isSurfaceActive: () => RippleBase.isSurfaceActive(this.$refs.control),
registerInteractionHandler: (evt, handler) => {
this.$refs.control.addEventListener(evt, handler, applyPassive());
},