Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOMRect instance properties #36704

Merged
merged 13 commits into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions files/en-us/web/api/domrect/domrect/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ new DOMRect(x, y, width, height)

### Parameters

- `x`
- {{domxref("DOMRect.x")}}
yashrajbharti marked this conversation as resolved.
Show resolved Hide resolved
- : The `x` coordinate of the `DOMRect`'s origin.
- `y`
- {{domxref("DOMRect.y")}}
yashrajbharti marked this conversation as resolved.
Show resolved Hide resolved
- : The `y` coordinate of the `DOMRect`'s origin.
- `width`
- {{domxref("DOMRect.width")}}
yashrajbharti marked this conversation as resolved.
Show resolved Hide resolved
- : The width of the `DOMRect`.
- `height`
- {{domxref("DOMRect.height")}}
yashrajbharti marked this conversation as resolved.
Show resolved Hide resolved
- : The height of the `DOMRect`.

### Return value
Expand Down
27 changes: 27 additions & 0 deletions files/en-us/web/api/domrect/height/index.md
Original file line number Diff line number Diff line change
@@ -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`.
yashrajbharti marked this conversation as resolved.
Show resolved Hide resolved

## Value

A double.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("DOMRectReadOnly")}}
8 changes: 4 additions & 4 deletions files/en-us/web/api/domrect/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
27 changes: 27 additions & 0 deletions files/en-us/web/api/domrect/width/index.md
Original file line number Diff line number Diff line change
@@ -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`.
yashrajbharti marked this conversation as resolved.
Show resolved Hide resolved

## Value

A double.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("DOMRectReadOnly")}}
27 changes: 27 additions & 0 deletions files/en-us/web/api/domrect/x/index.md
Original file line number Diff line number Diff line change
@@ -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.
yashrajbharti marked this conversation as resolved.
Show resolved Hide resolved

## Value

A double.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("DOMRectReadOnly")}}
27 changes: 27 additions & 0 deletions files/en-us/web/api/domrect/y/index.md
Original file line number Diff line number Diff line change
@@ -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.
yashrajbharti marked this conversation as resolved.
Show resolved Hide resolved

## Value

A double.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("DOMRectReadOnly")}}