INNER CODE UNIT · JavaScript

getWindowWidth

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

function getWindowWidth()
{
    return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth || 0;
}
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;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…