question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support getBoundingClientRect()

See original GitHub issue

The returned width and height should also be also available as what we get from el.getBoundingClientRect().width & el.getBoundingClientRect().height sometimes we need exact sitze and i didn’t see anything in the Readme that this library supports that already, please correct me if I’m wrong.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ivanjeremiccommented, Jun 30, 2022

Not sure what you mean by “exact size”. ResizeObservers support some box options now, maybe that’s what you need?

Thanks, I was thinking maybe this library will go in the direction like Solid.js primitive https://www.npmjs.com/package/@solid-primitives/resize-observer but totally ok if not, this is now solved for me and can be closed. Thanks

0reactions
ZeeCodercommented, Jun 30, 2022

Got it 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Element.getBoundingClientRect() | Can I use... Support tables ...
Method to get the size and position of an element's bounding box, relative to the viewport. Usage % of. all users, all tracked,...
Read more >
Element.getBoundingClientRect() - Web APIs | MDN
The Element.getBoundingClientRect() method returns a DOMRect object providing information about the size of an element and its position relative ...
Read more >
HTML DOM Element getBoundingClientRect() - W3Schools
The getBoundingClientRect() method returns a DOMRect object with eight properties: left, top, right, bottom, x, y, width, height.
Read more >
Browser Compatibility of Element.getBoundingClientRect()
Element.getBoundingClientRect() on Chrome is fully supported on 4-106, partially supported on None of the versions, and not supported on below 4 ...
Read more >
Element.getBoundingClientRect() - Support Tables
Element.getBoundingClientRect(). Method to get the size and position of an element's bounding box, relative to the viewport.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found