INNER CODE UNIT · JavaScript

getWindowHeight

ensisoft/detonator · docu/OpenGL Camera_files/songho.js:130

function getWindowHeight()
{
    return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0;
}



///////////////////////////////////////////////////////////////////////////////
// compute the offset position(left, top) of the element
///////////////////////////////////////////////////////////////////////////////
function getElementOffset(element)
{
    let x = 0;
    let y = 0;
    while(element)
    {
        x += element.offsetLeft || 0;
        y += element.offsetTop || 0;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…