From c05efa8d7ae464235cf83d7c0956e42dc6974103 Mon Sep 17 00:00:00 2001 From: julieng Date: Sat, 2 Oct 2021 17:20:14 +0200 Subject: move *.html to *.md --- .../api/htmliframeelement/contentwindow/index.html | 46 ---------------------- .../api/htmliframeelement/contentwindow/index.md | 46 ++++++++++++++++++++++ 2 files changed, 46 insertions(+), 46 deletions(-) delete mode 100644 files/fr/web/api/htmliframeelement/contentwindow/index.html create mode 100644 files/fr/web/api/htmliframeelement/contentwindow/index.md (limited to 'files/fr/web/api/htmliframeelement/contentwindow') diff --git a/files/fr/web/api/htmliframeelement/contentwindow/index.html b/files/fr/web/api/htmliframeelement/contentwindow/index.html deleted file mode 100644 index 2dd8193ca3..0000000000 --- a/files/fr/web/api/htmliframeelement/contentwindow/index.html +++ /dev/null @@ -1,46 +0,0 @@ ---- -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/contentwindow/index.md b/files/fr/web/api/htmliframeelement/contentwindow/index.md new file mode 100644 index 0000000000..2dd8193ca3 --- /dev/null +++ b/files/fr/web/api/htmliframeelement/contentwindow/index.md @@ -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")}}

-- cgit v1.2.3-54-g00ecf