### 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
return gin::ConvertToV8(isolate, content::GetFeatureStatus());
}
v8::Local<v8::Promise> App::GetGPUInfo(v8::Isolate* isolate,
                                       const std::string& info_type) {
  auto* const gpu_data_manager = content::GpuDataManagerImpl::GetInstance();
  gin_helper::Promise<base::DictionaryValue> promise(isolate);
  v8::Local<v8::Promise> handle = promise.GetHandle();
  if (info_type != "basic" && info_type != "complete") {
    promise.RejectWithErrorMessage(
        "Invalid info type. Use 'basic' or 'complete'");
    return handle;
  }
  std::string reason;
  if (!gpu_data_manager->GpuAccessAllowed(&reason)) {
    promise.RejectWithErrorMessage("GPU access not allowed. Reason: " + reason);
    return handle;
  }
  auto* const info_mgr = GPUInfoManager::GetInstance();
  if (info_type == "complete") {
#if defined(OS_WIN) || defined(OS_MAC)
    info_mgr->FetchCompleteInfo(std::move(promise));
#else
    info_mgr->FetchBasicInfo(std::move(promise));
#endif
  } else  {
    info_mgr->FetchBasicInfo(std::move(promise));
  }
  return handle;
}
static void RemoveNoSandboxSwitch(base::CommandLine* command_line) {