MCPcopy Create free account
hub / github.com/chartjs/Chart.js / _checkEventBindings

Method _checkEventBindings

src/core/core.controller.js:558–568  ·  view source on GitHub ↗

* @private

()

Source from the content-addressed store, hash-verified

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

Callers 1

updateMethod · 0.95

Calls 3

unbindEventsMethod · 0.95
bindEventsMethod · 0.95
setsEqualFunction · 0.85

Tested by

no test coverage detected