Class DOMRectReadOnly
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The DOMRectReadOnly interface specifies the standard properties (also used by DOMRect) to define a rectangle whose properties are immutable.
[Value("DOMRectReadOnly")]
public class DOMRectReadOnly
- Inheritance
-
DOMRectReadOnly
- Derived
- Inherited Members
Remarks
Constructors
DOMRectReadOnly()
public DOMRectReadOnly()
DOMRectReadOnly(double, double, double, double)
The DOMRectReadOnly() constructor creates a new DOMRectReadOnly object.
public DOMRectReadOnly(double x = 0, double y = 0, double width = 0, double height = 0)
Parameters
Remarks
Properties
Bottom
The bottom read-only property of the DOMRectReadOnly interface returns the bottom coordinate value of the DOMRect. (Has the same value as y + height, or y if height is negative.)
[Value("bottom")]
public double Bottom { get; }
Property Value
- double
A double.
Remarks
Height
The height read-only property of the DOMRectReadOnly interface represents the height of the DOMRect.
[Value("height")]
public double Height { get; }
Property Value
- double
A double.
Remarks
Left
The left read-only property of the DOMRectReadOnly interface returns the left coordinate value of the DOMRect. (Has the same value as x, or x + width if width is negative.)
[Value("left")]
public double Left { get; }
Property Value
- double
A double.
Remarks
Right
The right read-only property of the DOMRectReadOnly interface returns the right coordinate value of the DOMRect. (Has the same value as x + width, or x if width is negative.)
[Value("right")]
public double Right { get; }
Property Value
- double
A double.
Remarks
Top
The top read-only property of the DOMRectReadOnly interface returns the top coordinate value of the DOMRect. (Has the same value as y, or y + height if height is negative.)
[Value("top")]
public double Top { get; }
Property Value
- double
A double.
Remarks
Width
The width read-only property of the DOMRectReadOnly interface represents the width of the DOMRect.
[Value("width")]
public double Width { get; }
Property Value
- double
A double.
Remarks
X
The x read-only property of the DOMRectReadOnly interface represents the x coordinate of the DOMRect's origin.
[Value("x")]
public double X { get; }
Property Value
- double
A double.
Remarks
Y
The y read-only property of the DOMRectReadOnly interface represents the y coordinate of the DOMRect's origin.
[Value("y")]
public double Y { get; }
Property Value
- double
A double.
Remarks
Methods
FromRect(DOMRectInit)
The fromRect() static method of the
DOMRectReadOnly object creates a new DOMRectReadOnly
object with a given location and dimensions.
[Value("fromRect")]
public static DOMRectReadOnly FromRect(DOMRectInit other = null)
Parameters
otherDOMRectInit
Returns
- DOMRectReadOnly
An instance of DOMRectReadOnly.
Remarks
ToJSON()
The DOMRectReadOnly method toJSON() returns a JSON representation of the DOMRectReadOnly object.
[Value("toJSON")]
public Object ToJSON()
Returns
- Object
A new object whose properties are set to the values in the
DOMRectReadOnlyon which the method was called.