- Version
- 1.0.0
- License
- MIT
- Extends
- Popup
- Requires
- Popup
- Source
- PopupWrapper.js, line 14
Constructor
new PopupWrapper(player, rootEle, options, apiKeyopt)
Creates a new PopupWrapper instance.
| Name | Type | Attributes | Description |
|---|---|---|---|
player |
Player |
Reference to the VisionPlayer instance. |
|
rootEle |
HTMLElement |
Reference to the parent root element. |
|
options |
Object |
Additional options. |
|
apiKey |
symbol | optional |
Token for extended access to the player API. |
Members
private #player :Player
Reference to the main player instance.
- Type
- Player
- Source
- PopupWrapper.js, line 20
private #rootEle :HTMLElement
Reference to the player's root element.
- Type
- HTMLElement
- Source
- PopupWrapper.js, line 26
private #apiKey :symbol
Secret key only known to the player instance and initialized components. Used to be able to restrict access to API methods in conjunction with secure mode.
- Type
- symbol
- Source
- PopupWrapper.js, line 33
Methods
show(content, eventOrTarget, optionsopt)
Shows the popup with specified content and alignment target. Adds a CSS class to the player container for visual indication.
| Name | Type | Attributes | Description |
|---|---|---|---|
content |
string | HTMLElement | DocumentFragment |
The content to display in the popup. |
|
eventOrTarget |
Event | HTMLElement | DocumentFragment |
The event or element that triggered the popup. |
|
options |
Popup~options | optional |
Configuration overrides for this invocation. |
- Source
- PopupWrapper.js, line 61
onVisible()
Called when showing is completed (ie transition has ended).
- Source
- PopupWrapper.js, line 73
onHidden()
Called when hiding is completed (ie transition has ended). Removes the CSS class from the player container.
- Source
- PopupWrapper.js, line 84
Events
popup/show
This event is fired when the Popup is shown.
- Listeners
- UI#disableAutoHide
- Source
- PopupWrapper.js, line 95