function isChromeM90OrHigher() {
  const userAgentStr = function() {
    const navigator = goog.global.navigator;
    if (navigator) {
      const userAgent = navigator.userAgent;
      if (userAgent) {
        return userAgent;
      }
    }
    return '';
  }();

  const matchUserAgent = function(str) {
    return userAgentStr.indexOf(str) != -1;
  };

  if (!matchUserAgent('Chrome') || matchUserAgent('Edg')) {
    return false;
  }

  const match = /Chrome\/(\d+)/.exec(userAgentStr);
  const chromeVersion = parseInt(match[1], 10);
  return chromeVersion >= 90;
}
Detect the user agent is chrome and its version is higher than M90.
This code is hard-coded from goog.labs.userAgent.browser to avoid file size
increasing.
@return {boolean} Whether the above is true.