Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mounted() {
const { CHANGE_EVENT } = MDCIconButtonToggleFoundation.strings;
const adapter = {
addClass: className => this.$set(this.classes, className, true),
removeClass: className => this.$delete(this.classes, className),
hasClass: className => Boolean(this.classes[className]),
setAttr: (attrName, attrValue) =>
this.$el.setAttribute(attrName, attrValue),
notifyChange: evtData => {
this.$emit(CHANGE_EVENT, evtData);
this.$emit('change', evtData.isOn);
},
};
this.foundation = new MDCIconButtonToggleFoundation(adapter);
this.foundation.init();
this.ripple = new RippleBase(this, {
mounted() {
const { CHANGE_EVENT } = MDCIconButtonToggleFoundation.strings;
const adapter = {
addClass: className => this.$set(this.classes, className, true),
removeClass: className => this.$delete(this.classes, className),
hasClass: className => Boolean(this.classes[className]),
setAttr: (attrName, attrValue) =>
this.$el.setAttribute(attrName, attrValue),
notifyChange: evtData => {
this.$emit(CHANGE_EVENT, evtData);
this.$emit('change', evtData.isOn);
},
};
this.foundation = new MDCIconButtonToggleFoundation(adapter);
this.foundation.init();
this.ripple = new RippleBase(this, {