@wernfried/daterangepicker 5.5.1 → 5.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2335,24 +2335,37 @@ var DateRangePicker = (function(exports, luxon2) {
2335
2335
  });
2336
2336
  }
2337
2337
  /**
2338
- * Adds an event listener to the anchor element (e.g., `<input>`) the DateRangePicker is attached to.
2339
- * This allows external code to subscribe to native DOM events such as 'click', 'focus', 'keyup', etc.
2338
+ * Adding event listener to input element where dateragnepicker is attached to.
2339
+ * Wrapper to give easy access for `addEventListener()` on DateRangePicker instance.
2340
2340
  *
2341
- * @param {string} type - The event name (e.g., 'click', 'focus', 'keyup')
2341
+ * @param {string} type - The event name, either native DOM-Event or [DateRangePicker](API_Doc.md#event) specific event
2342
2342
  * @param {function} listener - The callback function invoked when the event fires
2343
2343
  * @param {boolean|object} [options] - Optional event options:
2344
2344
  * - `boolean capture`: Whether to listen in the capture phase (default: `false`)
2345
2345
  * - `object signal`: An `AbortSignal` for later removal of the listener (default: `undefined`)
2346
2346
  *
2347
2347
  * @example
2348
- * daterangepicker.addEventListener('click', (e) => {
2349
- * console.log('Picker element was clicked', e);
2348
+ * picker.addEventListener('hide', (e) => {
2349
+ * console.log('Picker element was hidden', e);
2350
2350
  * });
2351
2351
  *
2352
2352
  */
2353
2353
  addEventListener(type, listener, options) {
2354
2354
  this.element.addEventListener(type, listener, options);
2355
2355
  }
2356
+ /**
2357
+ * Counterpart to `addEventListener()`
2358
+ * Note, `listener` most be a named function to enable remove.
2359
+ *
2360
+ * @param {string} type - The event name, either native
2361
+ * @param {function} listener - The callback function invoked when the event fires
2362
+ * @param {boolean|object} [options] - Optional event options:
2363
+ * - `boolean capture`: Whether to listen in the capture phase (default: `false`)
2364
+ * - `object signal`: An `AbortSignal` for later removal of the listener (default: `undefined`)
2365
+ */
2366
+ removeEventListener(type, listener, options) {
2367
+ this.element.removeEventListener(type, listener, options);
2368
+ }
2356
2369
  }
2357
2370
  function createElementFromHTML(html) {
2358
2371
  const template = document.createElement("template");