riloadr.js
/*
         * Registers event listeners
         * React on scroll, resize and orientationchange events
         */
Registers event listeners
React on scroll, resize and orientationchange events
Registers event listeners React on scroll resize and orientationchange events
function addEventListeners() {
            var i = 0, current;
            if (deferInvisibleEnabled || watchViewportEnabled) {
                addEvent(win, RESIZE, resizeListener);
            }
            if (deferInvisibleEnabled) {
                addEvent(win, SCROLL, scrollListener);
                if (orientationSupported) {
                    lastOrientation = win[ORIENTATION];
                    addEvent(win, ORIENTATIONCHANGE, orientationchangeListener);
                }
                if (overflownElemsIds) {
                    while (current = overflownElemsIds[i]) {
                        addEvent(doc[GETELEMENTBYID](current), SCROLL, scrollListener);
                        i++;
                    }
                }
            }
        }
function addEventListeners ( ) { var i = 0 , current ; if ( deferInvisibleEnabled || watchViewportEnabled ) { addEvent ( win , RESIZE , resizeListener ) ; } if ( deferInvisibleEnabled ) { addEvent ( win , SCROLL , scrollListener ) ; if ( orientationSupported ) { lastOrientation = win [ ORIENTATION ] ; addEvent ( win , ORIENTATIONCHANGE , orientationchangeListener ) ; } if ( overflownElemsIds ) { while ( current = overflownElemsIds [ i ] ) { addEvent ( doc [ GETELEMENTBYID ] ( current ) , SCROLL , scrollListener ) ; i ++ ; } } } }
Registers event listeners
 React on scroll, resize and orientationchange events
Registers event listeners React on scroll resize and orientationchange events
// Event shared by defer & watchViewport modes // Is orientationchange event supported? If so, let's try to avoid false // positives by checking if win.orientation has actually changed. // Scroll events on overflown elements