MCPcopy
hub / github.com/chartjs/Chart.js / _checkEventBindings

Method _checkEventBindings

src/core/core.controller.js:554–564  ·  view source on GitHub ↗

* @private

()

Source from the content-addressed store, hash-verified

552 * @private
553 */
554 _checkEventBindings() {
555 const options = this.options;
556 const existingEvents = new Set(Object.keys(this._listeners));
557 const newEvents = new Set(options.events);
558
559 if (!setsEqual(existingEvents, newEvents) || !!this._responsiveListeners !== options.responsive) {
560 // The configured events have changed. Rebind.
561 this.unbindEvents();
562 this.bindEvents();
563 }
564 }
565
566 /**
567 * @private

Callers 1

updateMethod · 0.95

Calls 3

unbindEventsMethod · 0.95
bindEventsMethod · 0.95
setsEqualFunction · 0.85

Tested by

no test coverage detected