We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE

この翻訳は不完全です。英語から この記事を翻訳 してください。

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


Inherits properties from its parent, HTMLElement.

Is a DOMString that specifies the alignment of the frame with respect to the surrounding context.
Is a Boolean that indicates whether or not the inline frame is willing to be placed into full screen mode. See Using full-screen mode for details.
HTMLIFrameElement.contentDocument 読取専用
Returns a Document, the active document in the inline frame's nested browsing context.
HTMLIFrameElement.contentWindow 読取専用
Returns a WindowProxy, the window proxy for the nested browsing context.
Is a DOMString that indicates whether to create borders between frames.
Is a DOMString that reflects the height HTML attribute, indicating the height of the frame.
Is a DOMString that contains the URI of a long description of the frame.
Is a DOMString being the height of the frame margin.
Is a DOMString being the width of the frame margin.
Is a DOMString that reflects the name HTML attribute, containing a name by which to refer to the frame.
Is a DOMSettableTokenList that reflects the sandbox HTML attribute, indicating extra restrictions on the behavior of the nested content.
Is a DOMString that indicates whether the browser should provide scrollbars for the frame.
Is a Boolean that reflects the seamless HTML attribute, indicating that the inline frame should be rendered seamlessly within the parent document.
Is a DOMString that reflects the src HTML attribute, containing the address of the content to be embedded.
Is a DOMString that represents the content to display in the frame.
Is a DOMString that reflects the width HTML attribute, indicating the width of the frame.


No specific method; inherits properties from its parent, HTMLElement.


Specification Status Comment
HTML Living Standard
HTMLIFrameElement の定義
現行の標準 The following property has been added: allowFullscreen.
HTMLIFrameElement の定義
勧告 The following properties are now obsolete: scrolling, marginWidth, marginHeight, longDesc, frameBorder, and align.
The following properties have been added: srcdoc, sandbox, seamless, and contentWindow.
Document Object Model (DOM) Level 2 HTML Specification
HTMLIFrameElement の定義
廃止された The contentDocument property has been added.
Document Object Model (DOM) Level 1 Specification
HTMLIFrameElement の定義
廃止された Initial definition.

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support (有) 1.0 (1.7 or earlier) (有) (有) (有)
srcdoc 4 25 (25) ? ? ?
sandbox 4 17 (17) [1] ? ? ?
seamless 4 未サポート ? ? ?
contentDocument (有) (有) 8.0 (for older version use HTMLIFrameElement.contentWindow.document instead) (有) (有)
contentWindow ? ? (有) ? ?
allowFullScreen 17 -webkit
Daily test builds only
9.0 (9.0) -moz
18.0 (18.0)
未サポート 未サポート 未サポート
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support (有) 1.0 (1.0) (有) (有) (有)
srcdoc 4 25.0 (25) ? ? ?
sandbox 4 17.0 (17) [1] ? ? ?
seamless 4 未サポート ? ? ?
contentDocument (有) (有) ? (有) (有)
contentWindow ? ? ? ? ?
allowFullScreen 17 -webkit
Daily test builds only
9.0 (9.0) -moz
18.0 (18.0)
未サポート 未サポート 未サポート

[1] Previously, the type of sandbox was a DOMString instead of a DOMSettableTokenList. This has been fixed with Gecko 29.0 (Firefox 29 / Thunderbird 29 / SeaMonkey 2.26)) (バグ 845067). Other browsers may still implement the property as DOMString since it was a late change in the specification.

Firefox OS notes

Firefox OS extend the HTMLIFrameElement interface to support browser iframes. Those extra methods are made for privileged applications which want to implement a browser like application for Firefox OS devices. Not that in that context, the HTMLIFrameElement also inherit methods from the EventTarget interface. To learn how to implement such applications, see the Using the Browser API article.

Allows the parent to explicitly change the visibility state of the browser iframes.
Returns the current visibility state of the browser iframe. Returns a DOMRequest.
HTMLIFrameElement.sendMouseEvent(type, x, y, button, clickCount, modifiers)
Send a mouse event to the browser iframe.
HTMLIFrameElement.sendTouchEvent(type, identifiers, touchesX, touchesY,radiisX, radiisY, rotationAngles, forces,count, modifiers)
Send a touch event to the browser iframe.
Navigate the browser iframe back.
Navigate the browser iframe forward.
Reload the browser iframe.
Stop loading the browser iframe content.
Allows to remove the all browsing history of the browser iframe.
HTMLIFrameElement.getScreenshot(maxWidth, maxHeight)
Allows to take a screenshot of the browser iframe's content, scaled to fit within maxWidth and maxHeight pixels. Returns a DOMRequest.
Add a listener to recieve an event the first time the browser iframe is ready to paint (This listener is sent an event after the first MozAfterPaint event is dispacted in the iframe.)
Remove the listener added by the previous function.
Returns a DOMRequest which result is a boolean indicating wether the browser iframe can be navigate backward.
Returns a DOMRequest which result is a boolean indicating wether the browser iframe can be navigate forward.

See also

  • The HTML element implementing this interface: <iframe>


 このページの貢献者: fscholz
 最終更新者: fscholz,