### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

We need to load a custom error page when the certificate is invalid but without "isMainFrame" property we don't know when to load the custom error page using webContents.loadURL()

### Proposed Solution

webContents.on("certificate-error", ((event, url, error, certificate, callback, isMainFrame)

### Alternatives Considered

Not sure

### Additional Information

Not sure
shell/browser/api/electron_api_app.cc
result.reserve(app_metrics_.size());
  int processor_count = base::SysInfo::NumberOfProcessors();
  for (const auto& process_metric : app_metrics_) {
    gin_helper::Dictionary pid_dict = gin::Dictionary::CreateEmpty(isolate);
    gin_helper::Dictionary cpu_dict = gin::Dictionary::CreateEmpty(isolate);
    pid_dict.SetHidden("simple", true);
    cpu_dict.SetHidden("simple", true);
    cpu_dict.Set(
        "percentCPUUsage",
        process_metric.second->metrics->GetPlatformIndependentCPUUsage() /
            processor_count);
#if !defined(OS_WIN)
    cpu_dict.Set("idleWakeupsPerSecond",
                 process_metric.second->metrics->GetIdleWakeupsPerSecond());
#else
    
    
    
    cpu_dict.Set("idleWakeupsPerSecond", 0);
#endif
    pid_dict.Set("cpu", cpu_dict);
    pid_dict.Set("pid", process_metric.second->process.Pid());
    pid_dict.Set("type", content::GetProcessTypeNameInEnglish(
                             process_metric.second->type));
    pid_dict.Set("creationTime",
                 process_metric.second->process.CreationTime().ToJsTime());
    if (!process_metric.second->service_name.empty()) {
      pid_dict.Set("serviceName", process_metric.second->service_name);
    }
    if (!process_metric.second->name.empty()) {