addSelectionListeners() {
    if (!this.document) {
      return;
    }

    this._onSelectionChange = this.onSelectionChange.bind(this);
    this.document.addEventListener("selectionchange", this._onSelectionChange, {
      passive: true
    });
  }
Add listener for text selection
@private