IFrame
A content area to embed a web page.
IFrame supports permissions to allow or deny downloads, form submissions, microphone and camera access, and popups.
Use an HTML component to include custom HTML and CSS instead of an embedded web page. You can also use a Custom Component to include custom React, HTML, and JavaScript.
Properties
All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.
style
Custom style options.
Type | object | ||||
Mutability |
|
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
iFrame.reload()
Examples
Reload iFrame
.
iFrame.reload();
iFrame.scrollIntoView()
Scrolls the canvas or parent container so that the selected component appears in the visible area.
iFrame.scrollIntoView(options)
Parameters
Object Properties
behavior
The scroll behavior.
Type | string | ||||||
Allowed Values |
|
block
The scroll position relative to the component.
Type | string | ||||||||||
Allowed Values |
|
Examples
Scroll the minimum amount to immediately bring iFrame
into view.
iFrame.scrollIntoView({behavior: 'auto', block: 'nearest'});
iFrame.setHidden()
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
iFrame.setHidden(hidden)
Parameters
Examples
true
Examples
Hide iFrame
.
iFrame.setHidden(true);
Unhide iFrame
.
iFrame.setHidden(false);
iFrame.setPageUrl(url)