Not sure why you write `(this.$disabledEvents[type] || 0) + 1;`, looks unnecessary to me, but I might be missing something...

Could be just `this.$disabledEvents[type] = !this.$disabledEvents[type];`