Name
Frame: a <frame> in an HTML document — DOM Level 2 HTML: Node → Element → HTMLElement → Frame
Properties
As explained in the Description, HTML frames can be accessed as Frame objects or as Window objects. When accessed as Frame objects, they inherit properties from HTMLElement and define these additional properties:
-
Document contentDocument The document that holds the content of the frame.
-
String src The URL from which the frame’s content was loaded. Setting this property causes the frame to load a new document. This property simply mirrors the
srcattribute of the HTML<frame>tag: it is not a Location object likeWindow.location.
In addition to these properties, the Frame object also defines the following properties, which correspond directly to HTML attributes:
|
Property |
Attribute |
Description |
|
|
|
Set to “0” for borderless frames |
|
|
|
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 |
|
|
|
If |
|
|
|
Frame scroll policy: “auto”, “yes”, or “no” |
Description
Frames have a dual nature and may be represented in
client-side JavaScript by either Window or Frame objects. In the
traditional Level 0 DOM, each <frame> ...
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