getSearchParams = function(url) {
  if (goog.FEATURESET_YEAR >= 2020 ||
      (supportsNativeURLConstructor && url.searchParams)) {
    return url.searchParams;
  }
  return new SearchParamsImpl(url.search);
}
Returns a URLSearchParams-like object for a given URL object. This is used
instead of the native URL object's 'searchParams' property to allow the
Closure Compiler to code-strip the polyfill if searchParams are never used.
@param {!UrlLike|!URL} url The URL object to derive SearchParams for.
@return {!ReadonlySearchParams} The URLSearchParams-like object for the URL.
@suppress {strictMissingProperties} url.searchParams on union