### 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
const std::string& type) {
  if (Emit("will-continue-activity", type)) {
    *prevent_default = true;
  }
}
void App::OnDidFailToContinueUserActivity(const std::string& type,
                                          const std::string& error) {
  Emit("continue-activity-error", type, error);
}
void App::OnContinueUserActivity(bool* prevent_default,
                                 const std::string& type,
                                 const base::DictionaryValue& user_info,
                                 const base::DictionaryValue& details) {
  if (Emit("continue-activity", type, user_info, details)) {
    *prevent_default = true;
  }
}
void App::OnUserActivityWasContinued(const std::string& type,
                                     const base::DictionaryValue& user_info) {
  Emit("activity-was-continued", type, user_info);
}
void App::OnUpdateUserActivityState(bool* prevent_default,
                                    const std::string& type,
                                    const base::DictionaryValue& user_info) {
  if (Emit("update-activity-state", type, user_info)) {
    *prevent_default = true;
  }
}
void App::OnNewWindowForTab() {