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