window_->Focus(true);
}
+void Window::Blur() {
+ window_->Focus(false);
+}
+
bool Window::IsFocused() {
return window_->IsFocused();
}
.MakeDestroyable()
.SetMethod("close", &Window::Close)
.SetMethod("focus", &Window::Focus)
+ .SetMethod("blur", &Window::Blur)
.SetMethod("isFocused", &Window::IsFocused)
.SetMethod("show", &Window::Show)
.SetMethod("showInactive", &Window::ShowInactive)
});
});
+ describe('BrowserWindow.blur()', function() {
+ it('removes focus from window', function() {
+ w.blur();
+ assert(!w.isFocused());
+ });
+ });
+
describe('BrowserWindow.capturePage(rect, callback)', function() {
it('calls the callback with a Buffer', function(done) {
w.capturePage({