Skip to content

API > @blocksuite/blocks > getRectByBlockElement

Function: getRectByBlockElement ​

getRectByBlockElement(element): DOMRect

Returns rect of the block element.

Compatible with Safari! https://github.com/toeverything/blocksuite/issues/902https://github.com/toeverything/blocksuite/pull/1121

Parameters ​

ParameterType
elementElement | BlockComponentElement

Returns ​

DOMRect

Defined In ​

packages/blocks/src/_common/utils/query.ts:646