diff --git a/atom/browser/api/atom_api_window.cc b/atom/browser/api/atom_api_window.cc index 1914899297d8..95168efe9abd 100644 --- a/atom/browser/api/atom_api_window.cc +++ b/atom/browser/api/atom_api_window.cc @@ -193,7 +193,7 @@ void Window::OnWindowClosed() { #if defined(OS_WIN) void Window::OnWindowEndSession() { - Emit("endsession"); + Emit("session-end"); } #endif diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 2147645b21e0..8fcc3f8213d0 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -376,7 +376,7 @@ window.onbeforeunload = (e) => { Emitted when the window is closed. After you have received this event you should remove the reference to the window and avoid using it any more. -#### Event: 'endsession' _Windows_ +#### Event: 'session-end' _Windows_ Emitted when window session is going to end due to force shutdown or machine restart or session log off.