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

Booking Calendar, version 11.9. 38 lines.

- Page: https://pluginprobe.com/plugins/booking/11.9/code/vendors/imask/esm/controls/html-input-mask-element.js
- Raw: https://pluginprobe.com/plugins/booking/11.9/raw/vendors/imask/esm/controls/html-input-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/html-input-mask-element.js#L10-L20`.

```javascript
import HTMLMaskElement from './html-mask-element.js';
import IMask from '../core/holder.js';
import './mask-element.js';

/** Bridge between InputElement and {@link Masked} */
class HTMLInputMaskElement extends HTMLMaskElement {
  /** InputElement to use mask on */

  constructor(input) {
    super(input);
    this.input = input;
  }

  /** Returns InputElement selection start */
  get _unsafeSelectionStart() {
    return this.input.selectionStart != null ? this.input.selectionStart : this.value.length;
  }

  /** Returns InputElement selection end */
  get _unsafeSelectionEnd() {
    return this.input.selectionEnd;
  }

  /** Sets InputElement selection */
  _unsafeSelect(start, end) {
    this.input.setSelectionRange(start, end);
  }
  get value() {
    return this.input.value;
  }
  set value(value) {
    this.input.value = value;
  }
}
IMask.HTMLMaskElement = HTMLMaskElement;

export { HTMLInputMaskElement as default };

```
