()
| 22 | } |
| 23 | |
| 24 | init() { |
| 25 | this.isOpened = false; |
| 26 | this.openedWindow = false; |
| 27 | this.starter = false; |
| 28 | this._nextWindows = false; |
| 29 | this._scrollPosition = 0; |
| 30 | this._reopenTrigger = false; |
| 31 | this._overlayChecker = false; |
| 32 | this._isMoved = false; |
| 33 | this._focusElements = [ |
| 34 | 'a[href]', |
| 35 | 'area[href]', |
| 36 | 'input:not([disabled]):not([type="hidden"]):not([aria-hidden])', |
| 37 | 'select:not([disabled]):not([aria-hidden])', |
| 38 | 'textarea:not([disabled]):not([aria-hidden])', |
| 39 | 'button:not([disabled]):not([aria-hidden])', |
| 40 | 'iframe', |
| 41 | 'object', |
| 42 | 'embed', |
| 43 | '[contenteditable]', |
| 44 | '[tabindex]:not([tabindex^="-"])', |
| 45 | ]; |
| 46 | this._modalBlock = false; |
| 47 | |
| 48 | const existingShadow = document.querySelector('.hystmodal__shadow'); |
| 49 | if (existingShadow) { |
| 50 | this.shadow = existingShadow; |
| 51 | } else { |
| 52 | this.shadow = document.createElement('div'); |
| 53 | this.shadow.classList.add('hystmodal__shadow'); |
| 54 | document.body.appendChild(this.shadow); |
| 55 | } |
| 56 | this.eventsFeeler(); |
| 57 | } |
| 58 | |
| 59 | eventsFeeler() { |
| 60 | document.addEventListener('click', (e) => { |
no test coverage detected