PluginProbe
Booking Calendar / 11.8
Booking Calendar v11.8
11.8.4 11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 10.11 All 204 releases
booking / vendors / imask / esm / controls / mask-element.js

mask-element.js in Booking Calendar 11.8, at vendors/imask/esm/controls/mask-element.js

50 lines 921 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import IMask from '../core/holder.js';
2
3 /** Generic element API to use with mask */
4 class MaskElement {
5 /** */
6
7 /** */
8
9 /** */
10
11 /** Safely returns selection start */
12 get selectionStart() {
13 let start;
14 try {
15 start = this._unsafeSelectionStart;
16 } catch {}
17 return start != null ? start : this.value.length;
18 }
19
20 /** Safely returns selection end */
21 get selectionEnd() {
22 let end;
23 try {
24 end = this._unsafeSelectionEnd;
25 } catch {}
26 return end != null ? end : this.value.length;
27 }
28
29 /** Safely sets element selection */
30 select(start, end) {
31 if (start == null || end == null || start === this.selectionStart && end === this.selectionEnd) return;
32 try {
33 this._unsafeSelect(start, end);
34 } catch {}
35 }
36
37 /** */
38 get isActive() {
39 return false;
40 }
41 /** */
42
43 /** */
44
45 /** */
46 }
47 IMask.MaskElement = MaskElement;
48
49 export { MaskElement as default };
50