getIntrinsicSize

Commons
stable

Returns the bounding-box of an element with its right constraint removed and CSS transforms nullified, giving the element's natural (intrinsic) content dimensions. Used by the location/overlay positioning engine.

API

Signature

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

el
requis
HTMLElement
The overlay or positioned element to measure. Its inline right style is temporarily cleared and CSS transforms are zeroed before measurement.

API

Valeur de retour

La valeur retournée par cet util.

A DOMRect (or equivalent plain object) with x, y, width, height adjusted to remove the element's own transforms and right-pin offset.

Usage

Exemples

Extraits de code prêts à coller.

Measure natural content dimensions of an overlay

typescript