# booking/11.9/vendors/imask/esm/controls/mask-element.js

Booking Calendar, version 11.9. 50 lines.

- Page: https://pluginprobe.com/plugins/booking/11.9/code/vendors/imask/esm/controls/mask-element.js
- Raw: https://pluginprobe.com/plugins/booking/11.9/raw/vendors/imask/esm/controls/mask-element.js
- Modified: 2025-07-25T07:28:16+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/booking/11.9/code/vendors/imask/esm/controls/mask-element.js#L10-L20`.

```javascript
import IMask from '../core/holder.js';

/**  Generic element API to use with mask */
class MaskElement {
  /** */

  /** */

  /** */

  /** Safely returns selection start */
  get selectionStart() {
    let start;
    try {
      start = this._unsafeSelectionStart;
    } catch {}
    return start != null ? start : this.value.length;
  }

  /** Safely returns selection end */
  get selectionEnd() {
    let end;
    try {
      end = this._unsafeSelectionEnd;
    } catch {}
    return end != null ? end : this.value.length;
  }

  /** Safely sets element selection */
  select(start, end) {
    if (start == null || end == null || start === this.selectionStart && end === this.selectionEnd) return;
    try {
      this._unsafeSelect(start, end);
    } catch {}
  }

  /** */
  get isActive() {
    return false;
  }
  /** */

  /** */

  /** */
}
IMask.MaskElement = MaskElement;

export { MaskElement as default };

```
