Get or add a DOMRectCached instance for a specified element.
HTMLElement to get a DOMRectCached instance for.
Optional. Defaults to 300. If the instance, returned by this method, already exists in the cache. Then DOMRectCached.refresh method on the instance is called automatically if
timeInMsToNextRefresh = 0. Useful when DOMRectCached should be refreshed immediatly.timeInMsToNextRefresh > 0 && performance.now() - instance.lastRefreshInMs > timeInMsToNextRefreshThis means that if timeInMsToNextRefresh < 0 then DOMRectCached.refresh will never be called. This can be useful
when we never want to refresh the DOMRectCached instance.
A DOMRectCached element.
Cache for bounding client rectangles. This is useful when cost of
HTMLElement.getBoundingClientRect()becomes a problem (it causes browser reflow which in some situations can be very costly). By caching the information from theDOMRect, this cost can be avoided.