code: function _findOriginalTarget(ev) {
    // shadowdom
    if (ev.composedPath) {
      const targets = /** @type {!Array<!EventTarget>} */(ev.composedPath());
      // It shouldn't be, but sometimes targets is empty (window on Safari).
      return targets.length > 0 ? targets[0] : ev.target;
    }
    // shadydom
    return ev.target;
  }
docs: a cheaper check than ev.composedPath()[0];
  
  @private
  @param {Event} ev Event.
  @return {EventTarget} Returns the event target.