]> khamidou — GitHub mirrors - electron.git/commitdiff
Event "close" => "closed", fix #2149
authorCheng Zhao <zcbenz@gmail.com>
Fri, 10 Jul 2015 02:38:15 +0000 (10:38 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 10 Jul 2015 02:38:15 +0000 (10:38 +0800)
atom/browser/api/atom_api_web_contents.cc
spec/webview-spec.coffee

index e2d1b31ae3faabc2ec76a24da48a04a1257e6100..8db86f35934ae1bbb6695003b2190e8a972374ae 100644 (file)
@@ -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);
 }
index 451276adf49a606a8fa4c29d3365cf344ab11b3c..704bdd7f3fd82bb160cbb91e35ec148ba3d2d457 100644 (file)
@@ -192,7 +192,7 @@ describe '<webview> 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()