"did-finish-load" should only emit for main frame, fixes #385.

This commit is contained in:
Cheng Zhao 2014-06-09 12:03:19 +08:00
parent 2b0ec2bcc6
commit 7d38fe61d2
2 changed files with 13 additions and 1 deletions

View file

@ -38,6 +38,11 @@ void WebContents::DidFinishLoad(int64 frame_id,
const GURL& validated_url,
bool is_main_frame,
content::RenderViewHost* render_view_host) {
base::ListValue args;
args.AppendBoolean(is_main_frame);
Emit("did-frame-finish-load", args);
if (is_main_frame)
Emit("did-finish-load");
}

View file

@ -448,6 +448,13 @@ Emitted when the renderer process is crashed.
Emitted when the navigation is done, i.e. the spinner of the tab will stop
spinning, and the onload event was dispatched.
### Event: 'did-frame-finish-load'
* `event` Event
* `isMainFrame` Boolean
Emitted when a frame has done navigation.
### Event: 'did-start-loading'
### Event: 'did-stop-loading'