Merge pull request #1525 from deepak1556/dom_event_patch

webContents: providing dom-ready event
This commit is contained in:
Cheng Zhao 2015-05-01 12:08:03 +08:00
commit 817dfbdc27
8 changed files with 52 additions and 0 deletions

View file

@ -196,6 +196,12 @@ void WebContents::RenderProcessGone(base::TerminationStatus status) {
Emit("crashed");
}
void WebContents::DocumentLoadedInFrame(
content::RenderFrameHost* render_frame_host) {
if (!render_frame_host->GetParent())
Emit("dom-ready");
}
void WebContents::DidFinishLoad(content::RenderFrameHost* render_frame_host,
const GURL& validated_url) {
bool is_main_frame = !render_frame_host->GetParent();