function ScreenSpaceEventHandler(element) {
  this._inputEvents = {};
  this._buttonDown = {
    LEFT: false,
    MIDDLE: false,
    RIGHT: false,
  };
  this._isPinching = false;
  this._isTouchHolding = false;
  this._lastSeenTouchEvent =
    -ScreenSpaceEventHandler.mouseEmulationIgnoreMilliseconds;

  this._primaryStartPosition = new Cartesian2();
  this._primaryPosition = new Cartesian2();
  this._primaryPreviousPosition = new Cartesian2();

  this._positions = new AssociativeArray();
  this._previousPositions = new AssociativeArray();

  this._removalFunctions = [];

  this._touchHoldTimer = undefined;

  // TODO: Revisit when doing mobile development. May need to be configurable
  // or determined based on the platform?
  this._clickPixelTolerance = 5;
  this._holdPixelTolerance = 25;

  this._element = element ?? document;

  registerListeners(this);
}
Handles user input events. Custom functions can be added to be executed on
when the user enters input.

@alias ScreenSpaceEventHandler

@param {HTMLCanvasElement} [element=document] The element to add events to.

@constructor