sajad torkamani
// Define helper function
function getComputedCss(element: Element | null, property: string) {
  if (element) {
    return window.getComputedStyle(element, null).getPropertyValue(property)
  }
}


// Use function
getComputedCss(document. Body, 'font-family')

Sources

Tagged: