code: function selectionChange(e) {
            var pointRng;
  
            // Check if the button is down or not
            if (e.button) {
              // Create range from mouse position
              pointRng = rngFromPoint(e.x, e.y);
  
              if (pointRng) {
                // Check if pointRange is before/after selection then change the endPoint
                if (pointRng.compareEndPoints('StartToStart', startRng) > 0) {
                  pointRng.setEndPoint('StartToStart', startRng);
                } else {
                  pointRng.setEndPoint('EndToEnd', startRng);
                }
  
                pointRng.select();
              }
            } else {
              endSelection();
            }
          }
docs: Fires while the selection is changing