I am attempting to retrieve the offsetHeight of an element but I keep getting undefined.
When I use this code, it returns an HTML collection and everything works correctly:
document.getElementsByClassName("plyr--full-ui");
https://i.sstatic.net/xurBa.png
However, when I add .offsetHeight
, I get undefined:
document.getElementsByClassName("plyr--full-ui").offsetHeight;
What am I doing wrong?