showHTMLElement Method
Show an HTML element at a particular location.
showHTMLElement(displayElement: HTMLElement, location: Readonly<WritableXAndY>, offset: Readonly<WritableXAndY>, onCancel: OnCancelFunc, relativePosition?: RelativePosition, anchorElement?: HTMLElement): boolean
Parameter | Type | Description |
---|---|---|
displayElement | HTMLElement | The HTMLElement to display |
location | Readonly<WritableXAndY> | Location of the display element, relative to the origin of htmlElement or the window |
offset | Readonly<WritableXAndY> | Offset of the display element from the location |
onCancel | OnCancelFunc | Function invoked when the Escape key is pressed or a click occurs outside the display element |
relativePosition | RelativePosition | Position relative to the given location. Defaults to TopRight. |
anchorElement | HTMLElement | The HTMLElement that anchors the display element. If undefined, the location is relative to the overall window. |
Returns - boolean
true if the display element was displayed, false if the display element could not be displayed.
Defined in
Last Updated: 20 June, 2023