From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../api/htmliframeelement/contentwindow/index.html | 46 ++++ .../api/htmliframeelement/featurepolicy/index.html | 46 ++++ files/fr/web/api/htmliframeelement/index.html | 279 +++++++++++++++++++++ 3 files changed, 371 insertions(+) create mode 100644 files/fr/web/api/htmliframeelement/contentwindow/index.html create mode 100644 files/fr/web/api/htmliframeelement/featurepolicy/index.html create mode 100644 files/fr/web/api/htmliframeelement/index.html (limited to 'files/fr/web/api/htmliframeelement') diff --git a/files/fr/web/api/htmliframeelement/contentwindow/index.html b/files/fr/web/api/htmliframeelement/contentwindow/index.html new file mode 100644 index 0000000000..8ebaf2afd9 --- /dev/null +++ b/files/fr/web/api/htmliframeelement/contentwindow/index.html @@ -0,0 +1,46 @@ +--- +title: HTMLIFrameElement.contentWindow +slug: Web/API/HTMLIFrameElement/contentWindow +tags: + - API + - DOM + - Propriété + - Web +translation_of: Web/API/HTMLIFrameElement/contentWindow +--- +
{{APIRef("HTML DOM")}}
+ +

La propriété contentWindow renvoie l'objet Window d'un élément {{HTMLElement("iframe")}}. Cet objet Window peut être utilisé pour accéder au document de l'iframe et à son DOM. Cet attribut est en lecture seule mais ses propriétés peuvent être manipulées comme pour l'objet global Window.

+ +

Exemples

+ +
var x = document.getElementsByTagName("iframe")[0].contentWindow;
+//x = window.frames[0];
+
+x.document.getElementsByTagName("body")[0].style.backgroundColor = "blue";
+// ceci devrait changer le 1er iframe dans le document bleu.
+ +

Spécifications

+ + + + + + + + + + + + + + + + +
SpécificationÉtatCommentaires
{{SpecName('HTML WHATWG', '#dom-iframe-contentwindow', 'HTMLIFrameElement: contentWindow')}}{{Spec2('HTML WHATWG')}}
+ +

Compatibilité des navigateurs

+ + + +

{{Compat("api.HTMLIFrameElement.contentWindow")}}

diff --git a/files/fr/web/api/htmliframeelement/featurepolicy/index.html b/files/fr/web/api/htmliframeelement/featurepolicy/index.html new file mode 100644 index 0000000000..452e826dd6 --- /dev/null +++ b/files/fr/web/api/htmliframeelement/featurepolicy/index.html @@ -0,0 +1,46 @@ +--- +title: HTMLIFrameElement.featurePolicy +slug: Web/API/HTMLIFrameElement/featurePolicy +tags: + - API + - Feature Policy + - Feature-Policy + - HTMLIFrameElement + - Policy + - Property +translation_of: Web/API/HTMLIFrameElement/featurePolicy +--- +
{{APIRef("Feature Policy API")}}{{SeeCompatTable}}
+ +

La propriété en lecture seule featurePolicy de l'interface {{DOMxRef("HTMLIFrameElement")}} retourne l'interface {{DOMxRef("FeaturePolicy")}}, qui fournit une API simple pour consulter facilement les règles de fonctionnalités appliquées à un élément <iframe> spécifique.

+ +

Syntaxe

+ +
var policy = HTMLIFrameElement.featurePolicy
+ +

Valeur

+ +

Un objet FeaturePolicy pouvant être utilisé pour consulter les paramètres Feature Policy appliqués au cadre.

+ +

Spécification

+ + + + + + + + + + + + + + +
SpécificationÉtatCommentaire
{{SpecName("Feature Policy")}}{{Spec2("Feature Policy")}}Définition initiale.
+ +

Compatibilité des navigateurs

+ + + +

{{Compat("api.HTMLIFrameElement.featurePolicy")}}

diff --git a/files/fr/web/api/htmliframeelement/index.html b/files/fr/web/api/htmliframeelement/index.html new file mode 100644 index 0000000000..6a8377ba23 --- /dev/null +++ b/files/fr/web/api/htmliframeelement/index.html @@ -0,0 +1,279 @@ +--- +title: HTMLIFrameElement +slug: Web/API/HTMLIFrameElement +translation_of: Web/API/HTMLIFrameElement +--- +
+
{{APIRef("HTML DOM")}}
+
+ +

L'interface HTMLIFrameElement fournit des propriétés et des méthodes spéciales (en plus de celles de l'interface {{domxref("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,, {{domxref("HTMLElement")}}.

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

Méthodes

+ +

No specific method; inherits properties from its parent, {{domxref("HTMLElement")}}.

+ +

Spécifications

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', "the-iframe-element.html#the-iframe-element", "HTMLIFrameElement")}}{{Spec2('HTML WHATWG')}}The following property has been added: allowFullscreen.
{{SpecName('HTML5 W3C', "embedded-content-0.html#the-iframe-element", "HTMLIFrameElement")}}{{Spec2('HTML5 W3C')}}The following properties are now obsolete: scrolling, marginWidth, marginHeight, longDesc, frameBorder, and align.
+ The following properties have been added: srcdoc, sandbox, seamless, and contentWindow.
{{SpecName('DOM2 HTML', 'html.html#ID-50708718', 'HTMLIFrameElement')}}{{Spec2('DOM2 HTML')}}The contentDocument property has been added.
{{SpecName('DOM1', 'level-one-html.html#ID-50708718', 'HTMLIFrameElement')}}{{Spec2('DOM1')}}Initial definition.
+ +

Browser compatibility

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatVersionUnknown}}{{CompatGeckoDesktop(1.0)}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
srcdoc4{{CompatGeckoDesktop(25)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
sandbox4{{CompatGeckoDesktop(17)}} [1]{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
seamless {{experimental_inline}}4{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
contentDocument{{CompatVersionUnknown}}{{CompatVersionUnknown}}8.0 (for older version use HTMLIFrameElement.contentWindow.document instead){{CompatVersionUnknown}}{{CompatVersionUnknown}}
contentWindow{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}
allowFullScreen {{experimental_inline}}17 {{property_prefix("-webkit")}}
+ Daily test builds only
{{compatGeckoDesktop(9.0)}} {{property_prefix("-moz")}}
+ {{compatGeckoDesktop(18.0)}}
{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}{{CompatGeckoMobile(1.0)}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
srcdoc4{{CompatGeckoMobile(25)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
sandbox4{{CompatGeckoMobile(17)}} [1]{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
seamless {{experimental_inline}}4{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
contentDocument{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
contentWindow{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
allowFullScreen {{experimental_inline}}17 {{property_prefix("-webkit")}}
+ Daily test builds only
{{compatGeckoMobile(9.0)}} {{property_prefix("-moz")}}
+ {{compatGeckoMobile(18.0)}}
{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

[1] Previously, the type of sandbox was a {{domxref("DOMString")}} instead of a {{domxref("DOMSettableTokenList")}}. This has been fixed with Gecko 29.0 {{geckoRelease(29)}}) ({{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 {{domxref("EventTarget")}} interface. To learn how to implement such applications, see the Using the Browser API article.

+ +
+
{{domxref("HTMLIFrameElement.setVisible()","HTMLIFrameElement.setVisible(visible)")}}
+
Allows the parent to explicitly change the visibility state of the browser iframes.
+
{{domxref("HTMLIFrameElement.getVisible()","HTMLIFrameElement.getVisible()")}}
+
Returns the current visibility state of the browser iframe. Returns a {{domxref("DOMRequest")}}.
+
{{domxref("HTMLIFrameElement.sendMouseEvent()","HTMLIFrameElement.sendMouseEvent(type, x, y, button, clickCount, modifiers)")}}
+
Send a mouse event to the browser iframe.
+
{{domxref("HTMLIFrameElement.sendTouchEvent()","HTMLIFrameElement.sendTouchEvent(type, identifiers, touchesX, touchesY,radiisX, radiisY, rotationAngles, forces,count, modifiers)")}}
+
Send a touch event to the browser iframe.
+
{{domxref("HTMLIFrameElement.goBack()","HTMLIFrameElement.goBack()")}}
+
Navigate the browser iframe back.
+
{{domxref("HTMLIFrameElement.goForward()","HTMLIFrameElement.goForward()")}}
+
Navigate the browser iframe forward.
+
{{domxref("HTMLIFrameElement.reload()","HTMLIFrameElement.reload()")}}
+
Reload the browser iframe.
+
{{domxref("HTMLIFrameElement.stop()","HTMLIFrameElement.stop()")}}
+
Stop loading the browser iframe content.
+
{{domxref("HTMLIFrameElement.purgeHistory()","HTMLIFrameElement.purgeHistory()")}}
+
Allows to remove the all browsing history of the browser iframe.
+
{{domxref("HTMLIFrameElement.getScreenshot()","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 {{domxref("DOMRequest")}}.
+
{{domxref("HTMLIFrameElement.addNextPaintListener()","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 {{event("MozAfterPaint")}} event is dispacted in the iframe.)
+
{{domxref("HTMLIFrameElement.removeNextPaintListener()","HTMLIFrameElement.removeNextPaintListener()")}}
+
Remove the listener added by the previous function.
+
{{domxref("HTMLIFrameElement.getCanGoBack()","HTMLIFrameElement.getCanGoBack()")}}
+
Returns a {{domxref("DOMRequest")}} which result is a boolean indicating wether the browser iframe can be navigate backward.
+
{{domxref("HTMLIFrameElement.getCanGoForward()","HTMLIFrameElement.getCanGoForward()")}}
+
Returns a {{domxref("DOMRequest")}} which result is a boolean indicating wether the browser iframe can be navigate forward.
+
+ +

See also

+ + -- cgit v1.2.3-54-g00ecf