(pushbarId)
| 54 | } |
| 55 | |
| 56 | open(pushbarId) { |
| 57 | if (this.activeId === String(pushbarId) || !pushbarId) return; |
| 58 | if (this.activeId && this.activeId !== String(pushbarId)) this.close(); |
| 59 | this.activeId = pushbarId |
| 60 | this.activeElement = document.querySelector(`[data-pushbar-id="${this.activeId}"]`) |
| 61 | if (!this.activeElement) return; |
| 62 | this.emitOpening(); |
| 63 | this.activeElement.classList.add('opened'); |
| 64 | const pageRootElement = document.querySelector('html') |
| 65 | pageRootElement.classList.add('pushbar_locked'); |
| 66 | pageRootElement.setAttribute('pushbar', pushbarId) |
| 67 | } |
| 68 | |
| 69 | close() { |
| 70 | if (!this.activeId) return; |
no test coverage detected