The `did-fail-load` event on WebContents fires for other frames inside the main frame. It would be nice to get some information about whether the frame that failed was the main frame (as in the `did-frame-finish-load` event) or to not get this event at all if it didn’t happen in the main frame.

If I understand correctly, this is mainly a matter of checking whether the `RenderFrameHost` provided to the relevant callbacks in https://github.com/atom/electron/blob/e5aa712bf39178d89352332105c06d315dca0ca6/atom/browser/api/atom_api_web_contents.cc has a parent.

Happy to write a PR for this if someone can tell me which approach would be preferable (a boolean indicating mainFrame or just not having the event on child frames). Or some other approach.
- Electron version: 0.37.4
- Operating system: Mac OS X 10.11.4

atom/browser/api/atom_api_web_contents.cc
return web_contents()->GetUserAgentOverride();
}
void WebContents::InsertCSS(const std::string& css) {
  web_contents()->InsertCSS(css);
}
bool WebContents::SavePage(const base::FilePath& full_file_path,
                           const content::SavePageType& save_type,
                           const SavePageHandler::SavePageCallback& callback) {
  auto handler = new SavePageHandler(web_contents(), callback);
  return handler->Handle(full_file_path, save_type);
}
void WebContents::OpenDevTools(mate::Arguments* args) {
  if (type_ == REMOTE)
    return;
  bool detach = false;
  if (type_ == WEB_VIEW) {
    detach = true;
  } else if (args && args->Length() == 1) {
    mate::Dictionary options;
    args->GetNext(&options) && options.Get("detach", &detach);
  }
  managed_web_contents()->SetCanDock(!detach);
  managed_web_contents()->ShowDevTools();
}
void WebContents::CloseDevTools() {