Constructor
new VisualizationPanelView()
- Since:
- Source:
Extends
Members
className
- Source:
type :string
The type of View this is
Type:
- Source:
Methods
close()
Close the panel, stop the iframe, and fire a "close" event.
- Source:
events()
The events this view will listen to and the associated function to
call.
- Source:
getExpectedMessageOrigin(action, resolvedUrl) → {string|null}
Resolve expected postMessage origin for the current iframe action.
Parameters:
| Name |
Type |
Description |
action |
object
|
null
|
The active iframe action object. |
resolvedUrl |
string
|
The URL currently loaded in the iframe. |
- Since:
- Source:
Returns:
Strict origin expected for postMessage events.
-
Type
-
string
|
null
initialize()
Bind the Escape-key handler once so the same reference can be
added and removed from the document.
- Source:
isSourceFromActiveIframe(iframeWindow, sourceWindow) → {boolean}
Check whether a postMessage source window belongs to the active
iframe's browsing context. This accepts the iframe window itself and
same-origin descendant frames within that iframe.
Parameters:
| Name |
Type |
Description |
iframeWindow |
Window
|
The active iframe content window. |
sourceWindow |
WindowProxy
|
null
|
The postMessage source window. |
- Since:
- Source:
Returns:
`true` when sourceWindow is the iframe or a descendant.
-
Type
-
boolean
onClose()
Cleanup global handlers if the view is destroyed while open.
- Source:
open(payload)
Open the panel and load the given URL in the iframe. If the URL is
not trusted, show a plain link fallback instead.
Parameters:
| Name |
Type |
Description |
payload |
string
|
object
|
The URL string to load or an object
with `{ url, action }` for URL-template-aware visualizations. |
- Source:
Render the panel. The panel is hidden by default; call `open()` to
show it.
- Source:
Returns:
Returns the rendered view element.
-
Type
-
VisualizationPanelView