ResizeObserverSize: inlineSize property
The inlineSize
read-only property of the ResizeObserverSize
interface returns the length of the observed element's border box in the inline dimension. For boxes with a horizontal writing-mode
, this is the horizontal dimension, or width; if the writing-mode is vertical, this is the vertical dimension, or height.
Value
A decimal representing the inline size in pixels.
Examples
In this example we return an array of sizing information with ResizeObserverEntry.contentBoxSize
. The inlineSize
property returns the inline dimension size of the observed element.
const resizeObserver = new ResizeObserver((entries) => {
for (const entry of entries) {
const elemSize = entry.contentBoxSize[0];
console.log(elemSize.inlineSize);
}
});
resizeObserver.observe(divElem);
Specifications
Browser compatibility
|
Desktop |
Mobile |
|
Chrome |
Edge |
Firefox |
Internet Explorer |
Opera |
Safari |
WebView Android |
Chrome Android |
Firefox for Android |
Opera Android |
Safari on IOS |
Samsung Internet |
inlineSize |
84 |
84 |
69 |
No |
70 |
15.4 |
84 |
84 |
79 |
60 |
15.4 |
14.0 |