mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-30 21:28:59 +00:00
LibWeb: Implement DOMRect(ReadOnly)#fromRect
This will also be used by IntersectionObserver.
This commit is contained in:
parent
1d426df262
commit
6f8afd8cd9
Notes:
sideshowbarker
2024-07-17 03:10:07 +09:00
Author: https://github.com/Lubrsi
Commit: 6f8afd8cd9
Pull-request: https://github.com/SerenityOS/serenity/pull/19860
6 changed files with 35 additions and 0 deletions
|
@ -4,6 +4,8 @@ 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;
|
||||
|
@ -15,3 +17,10 @@ interface DOMRectReadOnly {
|
|||
readonly attribute double left;
|
||||
|
||||
};
|
||||
|
||||
dictionary DOMRectInit {
|
||||
unrestricted double x = 0;
|
||||
unrestricted double y = 0;
|
||||
unrestricted double width = 0;
|
||||
unrestricted double height = 0;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue