I want to get Element height from document
, I am trying get it with const header = document.getElementsByClassName(myClass)
. But there some problems in conversion of Element
to HTMLElement
. Are there some ways for building HTMLElement
from string
or getting attributes
like offsetHeight
from HTMLCollection
?
const myheader = document.getElementsByClassName(myClass);
console.info(myHeader[0].offsetHeight);