From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../fr/web/api/document/getboxobjectfor/index.html | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 files/fr/web/api/document/getboxobjectfor/index.html (limited to 'files/fr/web/api/document/getboxobjectfor') diff --git a/files/fr/web/api/document/getboxobjectfor/index.html b/files/fr/web/api/document/getboxobjectfor/index.html new file mode 100644 index 0000000000..97b613781e --- /dev/null +++ b/files/fr/web/api/document/getboxobjectfor/index.html @@ -0,0 +1,42 @@ +--- +title: Document.getBoxObjectFor() +slug: Web/API/Document/getBoxObjectFor +tags: + - API + - Boîte + - DOM + - Méthodes + - Objets +translation_of: Web/API/Document/getBoxObjectFor +--- +

{{ ApiRef("DOM") }} {{obsolete_header}}

+ +

Renvoie un boxObject (x, y, largeur, hauteur) pour un élément spécifié.

+ +
Note : Cette méthode est obsolète. Vous devez utiliser la méthode {{domxref("element.getBoundingClientRect()")}} à la place.
+ +

Syntaxe

+ +
boxObject = document.getBoxObjectFor(element);
+
+ + + +

Exemple

+ +
var myDiv = document.getElementById("myDiv"),
+    boxObj = document.getBoxObjectFor (myDiv);
+
+alert (
+  "x:" + boxObj.x +
+  ", y:" + boxObj.y +
+  ", Width:" + boxObj.width +
+  ", Height:" + boxObj.height
+);
+ +

Notes

+ +

Spécifié dans nsIXULDocument.idl

-- cgit v1.2.3-54-g00ecf