2022-10-07 19:45:09 -03:00
|
|
|
// https://drafts.fxtf.org/geometry/#domrectreadonly
|
|
|
|
|
[Exposed=(Window, Worker), Serializable]
|
2021-10-08 17:59:15 -03:00
|
|
|
interface DOMRectReadOnly {
|
2024-07-01 16:12:26 -03:00
|
|
|
constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
|
|
|
|
|
optional unrestricted double width = 0, optional unrestricted double height = 0);
|
2021-10-08 17:59:15 -03:00
|
|
|
|
2023-07-06 19:21:20 -03:00
|
|
|
[NewObject] static DOMRectReadOnly fromRect(optional DOMRectInit other = {});
|
|
|
|
|
|
2024-07-01 16:12:26 -03:00
|
|
|
readonly attribute unrestricted double x;
|
|
|
|
|
readonly attribute unrestricted double y;
|
|
|
|
|
readonly attribute unrestricted double width;
|
|
|
|
|
readonly attribute unrestricted double height;
|
2021-10-08 17:59:15 -03:00
|
|
|
|
2024-07-01 16:12:26 -03:00
|
|
|
readonly attribute unrestricted double top;
|
|
|
|
|
readonly attribute unrestricted double right;
|
|
|
|
|
readonly attribute unrestricted double bottom;
|
|
|
|
|
readonly attribute unrestricted double left;
|
2021-10-08 17:59:15 -03:00
|
|
|
|
2023-08-20 17:03:41 -03:00
|
|
|
[Default] object toJSON();
|
2021-10-08 17:59:15 -03:00
|
|
|
};
|
2023-07-06 19:21:20 -03:00
|
|
|
|
2024-07-01 16:12:26 -03:00
|
|
|
// https://drafts.fxtf.org/geometry/#dictdef-domrectinit
|
2023-07-06 19:21:20 -03:00
|
|
|
dictionary DOMRectInit {
|
|
|
|
|
unrestricted double x = 0;
|
|
|
|
|
unrestricted double y = 0;
|
|
|
|
|
unrestricted double width = 0;
|
|
|
|
|
unrestricted double height = 0;
|
|
|
|
|
};
|