Commit 51fc42a3 authored by Alejandro Celaya's avatar Alejandro Celaya Committed by Alejandro Celaya

Migrate dom module to TS

parent 311da648
......@@ -6,10 +6,10 @@
* descendants which may contribute to the effective margin due to CSS "margin
* collapsing".
*
* @param {Element} element - DOM element to measure
* @return {number|null} - The element's height in pixels
* @param element - DOM element to measure
* @return The element's height in pixels
*/
export function getElementHeightWithMargins(element) {
export function getElementHeightWithMargins(element: Element): number | null {
const style = window.getComputedStyle(element);
// Get the height of the element inside the border-box, excluding
// top and bottom margins.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment