function browserSupportsEntry(type) {
  return browser.execute((type) => {
    // More extensive feature detect needed for Firefox due to:
    // https://github.com/GoogleChrome/web-vitals/issues/142
    if (type === 'first-input' && !('PerformanceEventTiming' in self)) {
      return false;
    }

    // Firefox supports the event timing API but not `interactionId`.
    if (
      type === 'event' &&
      self.PerformanceEventTiming &&
      !('interactionId' in PerformanceEventTiming.prototype)
    ) {
      return false;
    }

    return self.PerformanceObserver?.supportedEntryTypes?.includes(type);
  }, type);
}
Returns true if the browser supports using PerformanceObserver and the
passed entry type.
@param {string} type The performance entry type.
@return {boolean}