MCPcopy Create free account
hub / github.com/angular/components / show

Method show

src/material/tooltip/testing/tooltip-harness.ts:40–50  ·  view source on GitHub ↗

Shows the tooltip.

()

Source from the content-addressed store, hash-verified

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> {

Callers 1

Calls 2

dispatchEventMethod · 0.65
hoverMethod · 0.65

Tested by

no test coverage detected