Shows the tooltip.
()
| 38 | |
| 39 | /** Shows the tooltip. */ |
| 40 | async show(): Promise<void> { |
| 41 | const host = await this.host(); |
| 42 | |
| 43 | // We need to dispatch both `touchstart` and a hover event, because the tooltip binds |
| 44 | // different events depending on the device. The `changedTouches` is there in case the |
| 45 | // element has ripples. |
| 46 | await host.dispatchEvent('touchstart', {changedTouches: []}); |
| 47 | await host.hover(); |
| 48 | const panel = await this._optionalPanel(); |
| 49 | await panel?.dispatchEvent('animationend', {animationName: this._showAnimationName}); |
| 50 | } |
| 51 | |
| 52 | /** Hides the tooltip. */ |
| 53 | async hide(): Promise<void> { |
no test coverage detected