From 36e6316557eace8a63b948b3a156dc9b1dfe11e4 Mon Sep 17 00:00:00 2001 From: yashrajbharticybtekk Date: Sat, 9 Nov 2024 22:28:53 +0530 Subject: [PATCH 01/13] add: DOMRect --- files/en-us/web/api/domrect/domrect/index.md | 8 +++--- files/en-us/web/api/domrect/height/index.md | 27 ++++++++++++++++++++ files/en-us/web/api/domrect/index.md | 8 +++--- files/en-us/web/api/domrect/width/index.md | 27 ++++++++++++++++++++ files/en-us/web/api/domrect/x/index.md | 27 ++++++++++++++++++++ files/en-us/web/api/domrect/y/index.md | 27 ++++++++++++++++++++ 6 files changed, 116 insertions(+), 8 deletions(-) create mode 100644 files/en-us/web/api/domrect/height/index.md create mode 100644 files/en-us/web/api/domrect/width/index.md create mode 100644 files/en-us/web/api/domrect/x/index.md create mode 100644 files/en-us/web/api/domrect/y/index.md diff --git a/files/en-us/web/api/domrect/domrect/index.md b/files/en-us/web/api/domrect/domrect/index.md index 01eb502dd82a2fd..b7bc41c7640abb7 100644 --- a/files/en-us/web/api/domrect/domrect/index.md +++ b/files/en-us/web/api/domrect/domrect/index.md @@ -18,13 +18,13 @@ new DOMRect(x, y, width, height) ### Parameters -- `x` +- {{domxref("DOMRect.x")}} - : The `x` coordinate of the `DOMRect`'s origin. -- `y` +- {{domxref("DOMRect.y")}} - : The `y` coordinate of the `DOMRect`'s origin. -- `width` +- {{domxref("DOMRect.width")}} - : The width of the `DOMRect`. -- `height` +- {{domxref("DOMRect.height")}} - : The height of the `DOMRect`. ### Return value diff --git a/files/en-us/web/api/domrect/height/index.md b/files/en-us/web/api/domrect/height/index.md new file mode 100644 index 000000000000000..9e5df44a4476ab4 --- /dev/null +++ b/files/en-us/web/api/domrect/height/index.md @@ -0,0 +1,27 @@ +--- +title: "DOMRect: height property" +short-title: height +slug: Web/API/DOMRect/height +page-type: web-api-instance-property +browser-compat: api.DOMRect.height +--- + +{{APIRef("Geometry Interfaces")}}{{AvailableInWorkers}} + +The **`height`** property of the **`DOMRect`** interface represents the height of the `DOMRect`. + +## Value + +A double. + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- {{domxref("DOMRectReadOnly")}} diff --git a/files/en-us/web/api/domrect/index.md b/files/en-us/web/api/domrect/index.md index f9b6a0b84f5061a..29b86f58f808c5f 100644 --- a/files/en-us/web/api/domrect/index.md +++ b/files/en-us/web/api/domrect/index.md @@ -24,13 +24,13 @@ It inherits from its parent, {{domxref("DOMRectReadOnly")}}. _`DOMRect` inherits properties from its parent, {{domxref("DOMRectReadOnly")}}. The difference is that they are not read-only anymore._ -- {{domxref("DOMRectReadOnly.x")}} +- {{domxref("DOMRect.x")}} - : The x coordinate of the `DOMRect`'s origin (typically the top-left corner of the rectangle). -- {{domxref("DOMRectReadOnly.y")}} +- {{domxref("DOMRect.y")}} - : The y coordinate of the `DOMRect`'s origin (typically the top-left corner of the rectangle). -- {{domxref("DOMRectReadOnly.width")}} +- {{domxref("DOMRect.width")}} - : The width of the `DOMRect`. -- {{domxref("DOMRectReadOnly.height")}} +- {{domxref("DOMRect.height")}} - : The height of the `DOMRect`. - {{domxref("DOMRectReadOnly.top")}} - : Returns the top coordinate value of the `DOMRect` (has the same value as `y`, or `y + height` if `height` is negative). diff --git a/files/en-us/web/api/domrect/width/index.md b/files/en-us/web/api/domrect/width/index.md new file mode 100644 index 000000000000000..457204312de239a --- /dev/null +++ b/files/en-us/web/api/domrect/width/index.md @@ -0,0 +1,27 @@ +--- +title: "DOMRect: width property" +short-title: width +slug: Web/API/DOMRect/width +page-type: web-api-instance-property +browser-compat: api.DOMRect.width +--- + +{{APIRef("Geometry Interfaces")}}{{AvailableInWorkers}} + +The **`width`** property of the **`DOMRect`** interface represents the width of the `DOMRect`. + +## Value + +A double. + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- {{domxref("DOMRectReadOnly")}} diff --git a/files/en-us/web/api/domrect/x/index.md b/files/en-us/web/api/domrect/x/index.md new file mode 100644 index 000000000000000..7e8f52f7ec9fb20 --- /dev/null +++ b/files/en-us/web/api/domrect/x/index.md @@ -0,0 +1,27 @@ +--- +title: "DOMRect: x property" +short-title: x +slug: Web/API/DOMRect/x +page-type: web-api-instance-property +browser-compat: api.DOMRect.x +--- + +{{APIRef("Geometry Interfaces")}}{{AvailableInWorkers}} + +The **`x`** property of the **`DOMRect`** interface represents the x coordinate of the `DOMRect`'s origin. + +## Value + +A double. + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- {{domxref("DOMRectReadOnly")}} diff --git a/files/en-us/web/api/domrect/y/index.md b/files/en-us/web/api/domrect/y/index.md new file mode 100644 index 000000000000000..ce78687f435778b --- /dev/null +++ b/files/en-us/web/api/domrect/y/index.md @@ -0,0 +1,27 @@ +--- +title: "DOMRect: y property" +short-title: "y" +slug: Web/API/DOMRect/y +page-type: web-api-instance-property +browser-compat: api.DOMRect.y +--- + +{{APIRef("Geometry Interfaces")}}{{AvailableInWorkers}} + +The **`y`** property of the **`DOMRect`** interface represents the y coordinate of the `DOMRect`'s origin. + +## Value + +A double. + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- {{domxref("DOMRectReadOnly")}} From f24b52672dd70d32433eecb6bcd7d6b37db6f55d Mon Sep 17 00:00:00 2001 From: Yash Raj Bharti <43868318+yashrajbharti@users.noreply.github.com> Date: Sat, 16 Nov 2024 18:24:12 +0530 Subject: [PATCH 02/13] Update files/en-us/web/api/domrect/domrect/index.md Co-authored-by: Estelle Weyl --- files/en-us/web/api/domrect/domrect/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/domrect/domrect/index.md b/files/en-us/web/api/domrect/domrect/index.md index b7bc41c7640abb7..fd02557f145bdbe 100644 --- a/files/en-us/web/api/domrect/domrect/index.md +++ b/files/en-us/web/api/domrect/domrect/index.md @@ -18,7 +18,7 @@ new DOMRect(x, y, width, height) ### Parameters -- {{domxref("DOMRect.x")}} +- {{domxref("DOMRect.x", "x")}} - : The `x` coordinate of the `DOMRect`'s origin. - {{domxref("DOMRect.y")}} - : The `y` coordinate of the `DOMRect`'s origin. From 7a4d7e87864eda47277b0959c981e40f4170afb6 Mon Sep 17 00:00:00 2001 From: Yash Raj Bharti <43868318+yashrajbharti@users.noreply.github.com> Date: Sat, 16 Nov 2024 18:24:24 +0530 Subject: [PATCH 03/13] Update files/en-us/web/api/domrect/domrect/index.md Co-authored-by: Estelle Weyl --- files/en-us/web/api/domrect/domrect/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/domrect/domrect/index.md b/files/en-us/web/api/domrect/domrect/index.md index fd02557f145bdbe..19d3c811fa093f3 100644 --- a/files/en-us/web/api/domrect/domrect/index.md +++ b/files/en-us/web/api/domrect/domrect/index.md @@ -20,7 +20,7 @@ new DOMRect(x, y, width, height) - {{domxref("DOMRect.x", "x")}} - : The `x` coordinate of the `DOMRect`'s origin. -- {{domxref("DOMRect.y")}} +- {{domxref("DOMRect.y", "y")}} - : The `y` coordinate of the `DOMRect`'s origin. - {{domxref("DOMRect.width")}} - : The width of the `DOMRect`. From dd07d9e104fb5b745133bb594402ca2878287603 Mon Sep 17 00:00:00 2001 From: Yash Raj Bharti <43868318+yashrajbharti@users.noreply.github.com> Date: Sat, 16 Nov 2024 18:24:33 +0530 Subject: [PATCH 04/13] Update files/en-us/web/api/domrect/domrect/index.md Co-authored-by: Estelle Weyl --- files/en-us/web/api/domrect/domrect/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/domrect/domrect/index.md b/files/en-us/web/api/domrect/domrect/index.md index 19d3c811fa093f3..c3bb01db13c7bbe 100644 --- a/files/en-us/web/api/domrect/domrect/index.md +++ b/files/en-us/web/api/domrect/domrect/index.md @@ -22,7 +22,7 @@ new DOMRect(x, y, width, height) - : The `x` coordinate of the `DOMRect`'s origin. - {{domxref("DOMRect.y", "y")}} - : The `y` coordinate of the `DOMRect`'s origin. -- {{domxref("DOMRect.width")}} +- {{domxref("DOMRect.width", "width")}} - : The width of the `DOMRect`. - {{domxref("DOMRect.height")}} - : The height of the `DOMRect`. From f47349870c5491b5ed1acea5bafa57fc706cd634 Mon Sep 17 00:00:00 2001 From: Yash Raj Bharti <43868318+yashrajbharti@users.noreply.github.com> Date: Sat, 16 Nov 2024 18:24:41 +0530 Subject: [PATCH 05/13] Update files/en-us/web/api/domrect/domrect/index.md Co-authored-by: Estelle Weyl --- files/en-us/web/api/domrect/domrect/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/domrect/domrect/index.md b/files/en-us/web/api/domrect/domrect/index.md index c3bb01db13c7bbe..887ca5241a45b99 100644 --- a/files/en-us/web/api/domrect/domrect/index.md +++ b/files/en-us/web/api/domrect/domrect/index.md @@ -24,7 +24,7 @@ new DOMRect(x, y, width, height) - : The `y` coordinate of the `DOMRect`'s origin. - {{domxref("DOMRect.width", "width")}} - : The width of the `DOMRect`. -- {{domxref("DOMRect.height")}} +- {{domxref("DOMRect.height", "height")}} - : The height of the `DOMRect`. ### Return value From b720b2545be0fb467aee88d2b03be64417e9df7b Mon Sep 17 00:00:00 2001 From: Yash Raj Bharti <43868318+yashrajbharti@users.noreply.github.com> Date: Sat, 16 Nov 2024 18:25:00 +0530 Subject: [PATCH 06/13] Update files/en-us/web/api/domrect/height/index.md Co-authored-by: Estelle Weyl --- files/en-us/web/api/domrect/height/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/domrect/height/index.md b/files/en-us/web/api/domrect/height/index.md index 9e5df44a4476ab4..3de1e0c5491b7b6 100644 --- a/files/en-us/web/api/domrect/height/index.md +++ b/files/en-us/web/api/domrect/height/index.md @@ -8,7 +8,7 @@ browser-compat: api.DOMRect.height {{APIRef("Geometry Interfaces")}}{{AvailableInWorkers}} -The **`height`** property of the **`DOMRect`** interface represents the height of the `DOMRect`. +The **`height`** property of the {{domxref("DOMRect")}} interface represents the height of the rectangle. The value can be negative. ## Value From f4b879041bf5a08986a732db4ab3eea09cb69abe Mon Sep 17 00:00:00 2001 From: Yash Raj Bharti <43868318+yashrajbharti@users.noreply.github.com> Date: Sat, 16 Nov 2024 18:25:10 +0530 Subject: [PATCH 07/13] Update files/en-us/web/api/domrect/width/index.md Co-authored-by: Estelle Weyl --- files/en-us/web/api/domrect/width/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/domrect/width/index.md b/files/en-us/web/api/domrect/width/index.md index 457204312de239a..c6bccf91230757f 100644 --- a/files/en-us/web/api/domrect/width/index.md +++ b/files/en-us/web/api/domrect/width/index.md @@ -8,7 +8,7 @@ browser-compat: api.DOMRect.width {{APIRef("Geometry Interfaces")}}{{AvailableInWorkers}} -The **`width`** property of the **`DOMRect`** interface represents the width of the `DOMRect`. +The **`width`** property of the {{domxref("DOMRect")}} interface represents the width of the rectangle. The value can be negative. ## Value From 114c35d616ad1c224f95532dd35207d7a62b73d1 Mon Sep 17 00:00:00 2001 From: Yash Raj Bharti <43868318+yashrajbharti@users.noreply.github.com> Date: Sat, 16 Nov 2024 18:25:21 +0530 Subject: [PATCH 08/13] Update files/en-us/web/api/domrect/x/index.md Co-authored-by: Estelle Weyl --- files/en-us/web/api/domrect/x/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/en-us/web/api/domrect/x/index.md b/files/en-us/web/api/domrect/x/index.md index 7e8f52f7ec9fb20..219c6acb6dc92ee 100644 --- a/files/en-us/web/api/domrect/x/index.md +++ b/files/en-us/web/api/domrect/x/index.md @@ -8,7 +8,9 @@ browser-compat: api.DOMRect.x {{APIRef("Geometry Interfaces")}}{{AvailableInWorkers}} -The **`x`** property of the **`DOMRect`** interface represents the x coordinate of the `DOMRect`'s origin. +The **`x`** property of the {{domxref("DOMRect")}} interface represents the x-coordinate of the rectangle, which is the horizontal distance between the viewport’s left edge and the rectangle’s origin. + +When the rectangle's width is non-negative, the rectangle’s horizontal origin is the viewport's left edge. If the width is negative, the rectangle's horizontal origin is the viewport's right edge. ## Value From 1f08b047b2d174269eff8fcc8823334cd909c064 Mon Sep 17 00:00:00 2001 From: Yash Raj Bharti <43868318+yashrajbharti@users.noreply.github.com> Date: Sat, 16 Nov 2024 18:25:30 +0530 Subject: [PATCH 09/13] Update files/en-us/web/api/domrect/y/index.md Co-authored-by: Estelle Weyl --- files/en-us/web/api/domrect/y/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/en-us/web/api/domrect/y/index.md b/files/en-us/web/api/domrect/y/index.md index ce78687f435778b..bc6f5b00b062f3c 100644 --- a/files/en-us/web/api/domrect/y/index.md +++ b/files/en-us/web/api/domrect/y/index.md @@ -8,7 +8,9 @@ browser-compat: api.DOMRect.y {{APIRef("Geometry Interfaces")}}{{AvailableInWorkers}} -The **`y`** property of the **`DOMRect`** interface represents the y coordinate of the `DOMRect`'s origin. +The **`y`** property of the {{domxref("DOMRect")}} interface represents the y-coordinate of the rectangle, which is the vertical distance between the viewport’s top edge and the rectangle’s origin. + +When the rectangle's height is non-negative, the rectangle’s vertical origin is the viewport's top edge. If the height has a negative height, the rectangle's vertical origin is the viewport's bottom edge. ## Value From 24a586037c22dc68a1b0168f8ce0644492349f61 Mon Sep 17 00:00:00 2001 From: Yash Raj Bharti <43868318+yashrajbharti@users.noreply.github.com> Date: Sat, 16 Nov 2024 18:27:34 +0530 Subject: [PATCH 10/13] Update files/en-us/web/api/domrect/x/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- files/en-us/web/api/domrect/x/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/domrect/x/index.md b/files/en-us/web/api/domrect/x/index.md index 219c6acb6dc92ee..fe07eb1563310eb 100644 --- a/files/en-us/web/api/domrect/x/index.md +++ b/files/en-us/web/api/domrect/x/index.md @@ -8,7 +8,7 @@ browser-compat: api.DOMRect.x {{APIRef("Geometry Interfaces")}}{{AvailableInWorkers}} -The **`x`** property of the {{domxref("DOMRect")}} interface represents the x-coordinate of the rectangle, which is the horizontal distance between the viewport’s left edge and the rectangle’s origin. +The **`x`** property of the {{domxref("DOMRect")}} interface represents the x-coordinate of the rectangle, which is the horizontal distance between the viewport's left edge and the rectangle's origin. When the rectangle's width is non-negative, the rectangle’s horizontal origin is the viewport's left edge. If the width is negative, the rectangle's horizontal origin is the viewport's right edge. From 195be6b1b64624f282d26f2f83614d897386a473 Mon Sep 17 00:00:00 2001 From: Yash Raj Bharti <43868318+yashrajbharti@users.noreply.github.com> Date: Sat, 16 Nov 2024 18:27:47 +0530 Subject: [PATCH 11/13] Update files/en-us/web/api/domrect/x/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- files/en-us/web/api/domrect/x/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/domrect/x/index.md b/files/en-us/web/api/domrect/x/index.md index fe07eb1563310eb..0810c777f9ef0a3 100644 --- a/files/en-us/web/api/domrect/x/index.md +++ b/files/en-us/web/api/domrect/x/index.md @@ -10,7 +10,7 @@ browser-compat: api.DOMRect.x The **`x`** property of the {{domxref("DOMRect")}} interface represents the x-coordinate of the rectangle, which is the horizontal distance between the viewport's left edge and the rectangle's origin. -When the rectangle's width is non-negative, the rectangle’s horizontal origin is the viewport's left edge. If the width is negative, the rectangle's horizontal origin is the viewport's right edge. +When the rectangle's width is non-negative, the rectangle's horizontal origin is the viewport's left edge. If the width is negative, the rectangle's horizontal origin is the viewport's right edge. ## Value From eefad1b54e74d60cc0ba18236f516407c20cfeb4 Mon Sep 17 00:00:00 2001 From: Yash Raj Bharti <43868318+yashrajbharti@users.noreply.github.com> Date: Sat, 16 Nov 2024 18:27:57 +0530 Subject: [PATCH 12/13] Update files/en-us/web/api/domrect/y/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- files/en-us/web/api/domrect/y/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/domrect/y/index.md b/files/en-us/web/api/domrect/y/index.md index bc6f5b00b062f3c..8d12d30604ab35e 100644 --- a/files/en-us/web/api/domrect/y/index.md +++ b/files/en-us/web/api/domrect/y/index.md @@ -8,7 +8,7 @@ browser-compat: api.DOMRect.y {{APIRef("Geometry Interfaces")}}{{AvailableInWorkers}} -The **`y`** property of the {{domxref("DOMRect")}} interface represents the y-coordinate of the rectangle, which is the vertical distance between the viewport’s top edge and the rectangle’s origin. +The **`y`** property of the {{domxref("DOMRect")}} interface represents the y-coordinate of the rectangle, which is the vertical distance between the viewport's top edge and the rectangle's origin. When the rectangle's height is non-negative, the rectangle’s vertical origin is the viewport's top edge. If the height has a negative height, the rectangle's vertical origin is the viewport's bottom edge. From 337a214e54565c9972a95e3980b4850827c37595 Mon Sep 17 00:00:00 2001 From: Yash Raj Bharti <43868318+yashrajbharti@users.noreply.github.com> Date: Sat, 16 Nov 2024 18:28:08 +0530 Subject: [PATCH 13/13] Update files/en-us/web/api/domrect/y/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- files/en-us/web/api/domrect/y/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/domrect/y/index.md b/files/en-us/web/api/domrect/y/index.md index 8d12d30604ab35e..400647a66cf83a1 100644 --- a/files/en-us/web/api/domrect/y/index.md +++ b/files/en-us/web/api/domrect/y/index.md @@ -10,7 +10,7 @@ browser-compat: api.DOMRect.y The **`y`** property of the {{domxref("DOMRect")}} interface represents the y-coordinate of the rectangle, which is the vertical distance between the viewport's top edge and the rectangle's origin. -When the rectangle's height is non-negative, the rectangle’s vertical origin is the viewport's top edge. If the height has a negative height, the rectangle's vertical origin is the viewport's bottom edge. +When the rectangle's height is non-negative, the rectangle's vertical origin is the viewport's top edge. If the height has a negative height, the rectangle's vertical origin is the viewport's bottom edge. ## Value