HTMLIFrameElement

par 1 contributeur :

Cette traduction est incomplète. Aidez à traduire cet article depuis l'anglais.

L'interface HTMLIFrameElement fournit des propriétés et des méthodes spéciales (en plus de celles de l'interface HTMLElement auxquelles il peut accéder par héritage) pour manipuler la disposition et la présentation des éléments "en-ligne" d'une frame.

Propriétés

Propriétés héritées de son parent,, HTMLElement.

HTMLIFrameElement.align
Is a DOMString that specifies the alignment of the frame with respect to the surrounding context.
HTMLIFrameElement.allowfullscreen
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 Lecture seule
Returns a Document, the active document in the inline frame's nested browsing context.
HTMLIFrameElement.contentWindow Lecture seule
Returns a WindowProxy, the window proxy for the nested browsing context.
HTMLIFrameElement.frameborder
Is a DOMString that indicates whether to create borders between frames.
HTMLIFrameElement.height
Is a DOMString that reflects the height HTML attribute, indicating the height of the frame.
HTMLIFrameElement.longDesc
Is a DOMString that contains the URI of a long description of the frame.
HTMLIFrameElement.marginHeight
Is a DOMString being the height of the frame margin.
HTMLIFrameElement.marginWidth
Is a DOMString being the width of the frame margin.
HTMLIFrameElement.name
Is a DOMString that reflects the name HTML attribute, containing a name by which to refer to the frame.
HTMLIFrameElement.sandbox
Is a DOMSettableTokenList that reflects the sandbox HTML attribute, indicating extra restrictions on the behavior of the nested content.
HTMLIFrameElement.scrolling
Is a DOMString that indicates whether the browser should provide scrollbars for the frame.
HTMLIFrameElement.seamless
Is a Boolean that reflects the seamless HTML attribute, indicating that the inline frame should be rendered seamlessly within the parent document.
HTMLIFrameElement.src
Is a DOMString that reflects the src HTML attribute, containing the address of the content to be embedded.
HTMLIFrameElement.srcdoc
Is a DOMString that represents the content to display in the frame.
HTMLIFrameElement.width
Is a DOMString that reflects the width HTML attribute, indicating the width of the frame.

Méthodes

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

Spécifications

Specification Status Comment
WHATWG HTML Living Standard
La définition de 'HTMLIFrameElement' dans cette spécification.
Standard évolutif The following property has been added: allowFullscreen.
HTML5
La définition de 'HTMLIFrameElement' dans cette spécification.
Recommendation 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
La définition de 'HTMLIFrameElement' dans cette spécification.
Recommendation The contentDocument property has been added.
Document Object Model (DOM) Level 1 Specification
La définition de 'HTMLIFrameElement' dans cette spécification.
Recommendation Initial definition.

Browser compatibility

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

[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)) (bug 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.

HTMLIFrameElement.setVisible(visible)
Allows the parent to explicitly change the visibility state of the browser iframes.
HTMLIFrameElement.getVisible()
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.
HTMLIFrameElement.goBack()
Navigate the browser iframe back.
HTMLIFrameElement.goForward()
Navigate the browser iframe forward.
HTMLIFrameElement.reload()
Reload the browser iframe.
HTMLIFrameElement.stop()
Stop loading the browser iframe content.
HTMLIFrameElement.purgeHistory()
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.
HTMLIFrameElement.addNextPaintListener()
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.)
HTMLIFrameElement.removeNextPaintListener()
Remove the listener added by the previous function.
HTMLIFrameElement.getCanGoBack()
Returns a DOMRequest which result is a boolean indicating wether the browser iframe can be navigate backward.
HTMLIFrameElement.getCanGoForward()
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>

Étiquettes et contributeurs liés au document

Contributeurs à cette page : thbil
Dernière mise à jour par : thbil,
Masquer la barre latérale