Name
IFrame: an <iframe> in an HTML document — DOM Level 2 HTML: Node → Element → HTMLElement → IFrame
Properties
As explained in the following Description, iframe elements can be accessed as IFrame objects or as Window objects. When accessed as IFrame objects, they inherit properties from HTMLElement and define the additional properties below:
-
Document contentDocument The document that holds the content of the
<iframe>.-
String src The URL from which the iframe’s content was loaded. Setting this property causes the iframe to load a new document. This property simply mirrors the
srcattribute of the HTML<iframe>tag.
In addition to these properties, the IFrame object also defines the following properties, which
correspond directly to HTML attributes of the <iframe> tag:
|
Property |
Attribute |
Description |
|
|
|
Alignment with respect to inline content |
|
|
|
Set to “0” for borderless frames |
|
|
|
Height of the viewport in pixels or percent |
|
|
|
The URL of a frame description |
|
|
|
Top and bottom frame margin, in pixels |
|
|
|
Left and right frame margin, in pixels |
|
|
|
The name of the frame, for DOM Level 0 lookup and form and link targets |
|
|
|
Frame scroll policy: “auto”, “yes”, or “no” |
|
|
|
Width of the viewport in pixels or percent |
Description ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access