From: Cheng Zhao Date: Fri, 10 Jul 2015 02:38:15 +0000 (+0800) Subject: Event "close" => "closed", fix #2149 X-Git-Tag: v0.30.0~41 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=4379d24e9df11ced6849488b7492c4353ce30aa5;p=electron.git Event "close" => "closed", fix #2149 --- diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index e2d1b31a..8db86f35 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -250,7 +250,7 @@ void WebContents::MoveContents(content::WebContents* source, } void WebContents::CloseContents(content::WebContents* source) { - Emit("closed"); + Emit("close"); if (type_ == BROWSER_WINDOW) owner_window()->CloseContents(source); } diff --git a/spec/webview-spec.coffee b/spec/webview-spec.coffee index 451276ad..704bdd7f 100644 --- a/spec/webview-spec.coffee +++ b/spec/webview-spec.coffee @@ -192,7 +192,7 @@ describe ' tag', -> document.body.appendChild webview describe 'close event', -> - it 'should fire when interior page calls window.close', -> + it 'should fire when interior page calls window.close', (done) -> webview.addEventListener 'close', -> done()