src/lib/global-events.js
// these events should only be fired once on a page
these events should only be fired once on a page
these events should only be fired once on a page
function attachGlobalEvents() {
  addEventListener(document, EVENT_CLICK, onClick, CAPTURE);
  addEventListener(document, EVENT_MOUSEDOWN, onMouseDown, CAPTURE);
  addEventListener(document, EVENT_MOUSEMOVE, onMouseMove, CAPTURE_PASSIVE);
  addEventListener(window, EVENT_SCROLL, onScroll, CAPTURE_PASSIVE);
  PageLifecycle.addEventListener(EVENT_STATECHANGE, onPageStateChange);
}
function attachGlobalEvents ( ) { addEventListener ( document , EVENT_CLICK , onClick , CAPTURE ) ; addEventListener ( document , EVENT_MOUSEDOWN , onMouseDown , CAPTURE ) ; addEventListener ( document , EVENT_MOUSEMOVE , onMouseMove , CAPTURE_PASSIVE ) ; addEventListener ( window , EVENT_SCROLL , onScroll , CAPTURE_PASSIVE ) ; PageLifecycle . addEventListener ( EVENT_STATECHANGE , onPageStateChange ) ; }
these events should only be fired once on a page
these events should only be fired once on a page