API > @blocksuite/blocks > getClosestBlockElementByElement
Function: getClosestBlockElementByElement ​
getClosestBlockElementByElement(
element
):BlockComponentElement
|null
Returns the closest block element by element that does not contain the page element and note element.
Parameters ​
Parameter | Type |
---|---|
element | null | Element |
Returns ​
BlockComponentElement
| null
Defined In ​
packages/blocks/src/_common/utils/query.ts:608