Name
IFrame — an HTML <iframe>
Inherits from
Node, Element
Synopsis
An IFrame object represents an <iframe> element in an HTML
document. If you look up an <iframe> using getElementById() or a similar query
function, you’ll get an IFrame object. If, however, you access the
<iframe> through the
frames property of the Window
object, or by using the name of the <iframe> as a property of the
containing window, the object you obtain is the Window object that
the <iframe>
represents.
Properties
readonly DocumentcontentDocumentThe document contained in this
<iframe>element. If the document displayed in the<iframe>is from a different origin, the same-origin policy (The Same-Origin Policy) will prevent access to this document.readonly WindowcontentWindowThe Window object of the
<iframe>. (TheframeElementof that Window object will be a reference back to this IFrame object.)stringheightThe height, in CSS pixels, of the
<iframe>. This property mirrors the HTMLheightattribute.stringnameThe name of the
<iframe>. This property mirrors the HTMLnameattribute, and its value can be used as thetargetof Link and Form objects.readonly DOMSettableTokenListsandboxThis property mirrors the HTML5
sandboxattribute and allows it to be queried and set as a string or as a set of individual tokens.The
sandboxattribute specifies that the browser should impose additional security restrictions on untrusted content displayed in an<iframe>. If thesandboxattribute is present but empty, the<iframe>content ...
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