Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. HTMLIFrameElement

HTMLIFrameElement

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨July 2015⁩.

* Some parts of this feature may have varying levels of support.

TheHTMLIFrameElement interface provides special properties and methods (beyond those of theHTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of inline frame elements.

EventTarget Node Element HTMLElement HTMLIFrameElement

Instance properties

Inherits properties from its parent,HTMLElement.

HTMLIFrameElement.alignDeprecated

A string that specifies the alignment of the frame with respect to the surrounding context.

HTMLIFrameElement.allow

A string that indicates thePermissions Policy specified for this<iframe>.

HTMLIFrameElement.allowFullscreen

A boolean value indicating whether the inline frame is willing to be placed into full screen mode. SeeUsing fullscreen mode for details.

HTMLIFrameElement.allowPaymentRequestDeprecatedNon-standard

A boolean value indicating whether thePayment Request API may be invoked inside a cross-origin iframe.

HTMLIFrameElement.browsingTopicsExperimentalNon-standard

A boolean property specifying that the selected topics for the current user should be sent with the request for the associated<iframe>'s source. This reflects thebrowsingtopics content attribute value.

HTMLIFrameElement.contentDocumentRead only

Returns aDocument, the active document in the inline frame's nested browsing context.

HTMLIFrameElement.contentWindowRead only

Returns aWindowProxy, the window proxy for the nested browsing context.

HTMLIFrameElement.credentiallessExperimental

A boolean value indicating whether the<iframe> is credentialless, meaning that its content is loaded in a new, ephemeral context. This context does not have access to the parent context's shared storage and credentials. In return, theCross-Origin-Embedder-Policy (COEP) embedding rules can be lifted, so documents with COEP set can embed third-party documents that do not. SeeIFrame credentialless for a deeper explanation.

HTMLIFrameElement.cspExperimental

Specifies the Content Security Policy that an embedded document must agree to enforce upon itself.

HTMLIFrameElement.featurePolicyRead onlyExperimental

Returns theFeaturePolicy interface which provides a simple API for introspecting thePermissions Policies applied to a specific document.

HTMLIFrameElement.frameBorderDeprecated

A string that indicates whether to create borders between frames.

HTMLIFrameElement.height

A string that reflects theheight HTML attribute, indicating the height of the frame.

HTMLIFrameElement.loading

A string providing a hint to the browser that the iframe should be loaded immediately (eager) or on an as-needed basis (lazy).This reflects theloading HTML attribute.

HTMLIFrameElement.longDescDeprecated

A string that contains the URI of a long description of the frame.

HTMLIFrameElement.marginHeightDeprecated

A string being the height of the frame margin.

HTMLIFrameElement.marginWidthDeprecated

A string being the width of the frame margin.

HTMLIFrameElement.name

A string that reflects thename HTML attribute, containing a name by which to refer to the frame.

HTMLIFrameElement.referrerPolicy

A string that reflects thereferrerPolicy HTML attribute indicating which referrer to use when fetching the linked resource.

HTMLIFrameElement.sandboxRead only

Returns aDOMTokenList that reflects thesandbox HTML attribute, indicating extra restrictions on the behavior of the nested content.

HTMLIFrameElement.scrollingDeprecated

A string that indicates whether the browser should provide scrollbars for the frame.

HTMLIFrameElement.src

A string that reflects thesrc HTML attribute, containing the address of the content to be embedded. Note that programmatically removing an<iframe>'s src attribute (e.g., viaElement.removeAttribute()) causesabout:blank to be loaded in the frame in Firefox (from version 65), Chromium-based browsers, and Safari/iOS.

HTMLIFrameElement.srcdoc

ATrustedHTML or string that represents the HTML document loaded into the frame.

HTMLIFrameElement.width

A string that reflects thewidth HTML attribute, indicating the width of the frame.

Instance methods

Also inherits methods from its parent interface,HTMLElement.

HTMLIFrameElement.getSVGDocument()

Returns the embedded SVG as aDocument.

Specifications

Specification
HTML
# htmliframeelement

Browser compatibility

See also

  • The HTML element implementing this interface:<iframe>

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp