All Downloads are FREE. Search and download functionalities are using the official Maven repository.

polyfills.~viewport.min.js Maven / Gradle / Ivy

The newest version!
!function(t){function e(){return(c.scrollLeft||l.scrollLeft||0)-(c.clientLeft||l.clientLeft||0)}function n(){return(c.scrollTop||l.scrollTop||0)-(c.clientTop||l.clientTop||0)}function i(){window.scrollX=window.pageXOffset=e(),window.scrollY=window.pageYOffset=n(),window.innerWidth=c.clientWidth,window.innerHeight=c.clientHeight}var o=t.document,c=o.documentElement,l=o.body||o.createElement("body");try{Object.defineProperties(t,{innerWidth:{get:function(){return c.clientWidth}},innerHeight:{get:function(){return c.clientHeight}},pageXOffset:{get:e},pageYOffset:{get:n},scrollX:{get:e},scrollY:{get:n}})}catch(r){window.attachEvent("onresize",i),window.attachEvent("onscroll",i),i()}}(this);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy