ladybird/Userland/Libraries/LibWeb/Geometry/DOMRectReadOnly.idl
Luke Wilde 6f8afd8cd9 LibWeb: Implement DOMRect(ReadOnly)#fromRect
This will also be used by IntersectionObserver.
2023-07-07 05:27:25 +02:00

27 lines
779 B
Plaintext

// https://drafts.fxtf.org/geometry/#domrectreadonly
[Exposed=(Window, Worker), Serializable]
interface DOMRectReadOnly {
constructor(optional double x = 0, optional double y = 0, optional double width = 0, optional double height = 0);
[NewObject] static DOMRectReadOnly fromRect(optional DOMRectInit other = {});
readonly attribute double x;
readonly attribute double y;
readonly attribute double width;
readonly attribute double height;
readonly attribute double top;
readonly attribute double right;
readonly attribute double bottom;
readonly attribute double left;
};
dictionary DOMRectInit {
unrestricted double x = 0;
unrestricted double y = 0;
unrestricted double width = 0;
unrestricted double height = 0;
};