function getVersion() {
  const userAgentString = util.getUserAgent();
  if (userAgentString) {
    const tuples = util.extractVersionTuples(userAgentString);

    const engineTuple = getEngineTuple(tuples);
    if (engineTuple) {
      // In Gecko, the version string is either in the browser info or the
      // Firefox version.  See Gecko user agent string reference:
      // http://goo.gl/mULqa
      if (engineTuple[0] == 'Gecko') {
        return getVersionForKey(tuples, 'Firefox');
      }

      return engineTuple[1];
    }

    // MSIE has only one version identifier, and the Trident version is
    // specified in the parenthetical. IE Edge is covered in the engine tuple
    // detection.
    const browserTuple = tuples[0];
    let info;
    if (browserTuple && (info = browserTuple[2])) {
      const match = /Trident\/([^\s;]+)/.exec(info);
      if (match) {
        return match[1];
      }
    }
  }
  return '';
}
@return {string} The rendering engine's version or empty string if version
    can't be determined.