Skip to main content

Home > blockly > utils > style > getSize

utils.style.getSize() function

Gets the height and width of an element. Similar to Closure's goog.style.getSize

Signature:

export declare function getSize(element: Element): Size;

Parameters

ParameterTypeDescription
elementElementElement to get size of.

Returns:

Size

Object with width/height properties.