docs: function createAbortError(win, opt_message) {
    const message = 'AbortError' + (opt_message ? ': ' + opt_message : '');
    let error = null;
    if (typeof win['DOMException'] == 'function') {
      // TODO(dvoytenko): remove typecast once externs are fixed.
      const constr = /** @type {function(new:DOMException, string, string)} */ (
          win['DOMException']);
      try {
        error = new constr(message, ABORT_ERR_NAME);
      } catch (e) {
        // Ignore. In particular, `new DOMException()` fails in Edge.
      }
    }
    if (!error) {
      // TODO(dvoytenko): remove typecast once externs are fixed.
      const constr = /** @type {function(new:DOMException, string)} */ (
          Error);
      error = new constr(message);
      error.name = ABORT_ERR_NAME;
      error.code = ABORT_ERR_CODE;
    }
    return error;
  }