-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add back ClientRect alias for DOMRectReadOnly #11960
Conversation
Since the properties top, right, bottom and left are on DOMRectReadOnly, it's necessary to treat ClientRect as an alias of both DOMRect and DOMRectReadOnly. See discussion starting here: mdn#11679 (comment) This reverts mdn#11694 but goes much further in representing the ClientRect support than before.
"version_added": "31" | ||
}, | ||
{ | ||
"alternative_name": "DOMRect", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to add this to not have a hole in the support for Firefox. It looks like Firefox first just renamed ClientRect
to DOMRect
and then split it into DOMRect
and DOMRectReadOnly
with all the extra bits. It's a bit weird to say that DOMRect
was an alias of DOMRectReadOnly
, but only because of their current relationship. The DOMRect
in Firefox 27-30 was just like ClientRect
in 3-26 AFAICT.
I'm not sure if some note would help explain this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm not sure there's a note to be written that doesn't exaggerate what the looks-weird-now-but-made-sense-then quality of the data. Let's leave this as-is. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @foolip! I'm happy with this approach. 🎉
"version_added": "31" | ||
}, | ||
{ | ||
"alternative_name": "DOMRect", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm not sure there's a note to be written that doesn't exaggerate what the looks-weird-now-but-made-sense-then quality of the data. Let's leave this as-is. 👍
Since the properties top, right, bottom and left are on DOMRectReadOnly,
it's necessary to treat ClientRect as an alias of both DOMRect and
DOMRectReadOnly. See discussion starting here:
#11679 (comment)
This reverts #11694 but
goes much further in representing the ClientRect support than before.