isCriticalIdle() {
    if (!this._networkRecorder) return false;
    const requests = this._networkRecorder.getRawRecords();
    const rootFrameRequest = requests.find(r => r.resourceType === 'Document');
    const rootFrameId = rootFrameRequest?.frameId;

    return this._isIdlePeriod(
      0,
      // Return true if it should be a candidate for critical.
      request =>
        request.frameId === rootFrameId &&
        // WebSocket and Server-sent Events are typically long-lived and shouldn't be considered critical.
        request.resourceType !== 'WebSocket' && request.resourceType !== 'EventSource' &&
        (request.priority === 'VeryHigh' || request.priority === 'High')
    );
  }
Returns whether any important resources for the page are in progress.
Above-the-fold images and XHRs should be included.
Tracking pixels, low priority images, and cross frame requests should be excluded.
@return {boolean}