I found this solution here: https://stackoverflow.com/a/7557433/5628
However, this is only for determining whether an element is visible within the viewport.
Instead: What I am attempting to do is slightly different in that I would like to determine whether the element takes up the entire viewport.