From 4379d24e9df11ced6849488b7492c4353ce30aa5 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 10 Jul 2015 10:38:15 +0800 Subject: [PATCH] Event "close" => "closed", fix #2149 --- atom/browser/api/atom_api_web_contents.cc | 2 +- spec/webview-spec.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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() -- 2.43.0