-
Notifications
You must be signed in to change notification settings - Fork 715
[css-omview] update description of getBoxQuads API #10537
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
Comments
I've also created a polyfill for this API https://github.com/jogibear9988/getBoxQuadsPolyfill But in the polyfill I also added an offset DOMQuad to the getBoxQuads API. I'd like to suggest to add this also. This is usefull in a designer application, if you want to draw something around an element with an offset. For example a selected rectangle, wich should be offset a few pixels |
And the polyfill does not work correctly for SVG and MathML cause of missing offsetLeft/Top, see: #10514 |
We need this for WebDriver-BiDi. It's something that Chrome Devtools Protocol offers and which clients depend on and which blocks their migration to the standard (e.g. Playwright). Use case wise, it's because automated testing tools want to be able to dispatch pointer events (e.g. click) inside an element, even when it's transformed. If there are concerns with landing a DOM API we could have a WebDriver-BiDi specific API to retrieve the bounding content quads for an element given a suitable definition, but if there is a DOM API we'd prefer to expose that directly. |
I hope we would get this as a DOM API. I think there are many App wich could benefit from such an API. For example WYSIWYG Designers (like https://github.com/node-projects/web-component-designer, https://grapesjs.com/, https://craft.js.org/, ...), VisBug (https://visbug.web.app/), SVG Editors (so many...) could benefit from this. My Designer is for example now using my polyfill, but it could not work correctly for SVG & MathML cause they don't provide offsetXXXX Properties. And also the performance is so much slower then the native implementation in Firefox. And the Brows does need to calculate these Points anyway to draw the elements. As I see, the DevTools API does not support the "fromBox" & "toBox" option. So this a thing wich need to be worked on. |
The getBoxQuads API is missing lot of its description.
Issue in Firefox:
https://bugzilla.mozilla.org/show_bug.cgi?id=1107559
Description
https://hacks.mozilla.org/2014/03/introducing-the-getboxquads-api/
The text was updated successfully, but these errors were encountered: