From 27759ac812196ae1241e9b6c3236ced18169218b Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Mon, 29 Aug 2011 15:57:13 -0700 Subject: [PATCH] Display console with cmd-ctrl-k. how do you close the console? You can't yet. http://www.opensource.apple.com/source/WebKit/WebKit-6531.9/mac/WebInspector/ --- src/editor.coffee | 3 +++ src/osx.coffee | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/editor.coffee b/src/editor.coffee index c3052efd3..cb7c30b11 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -126,3 +126,6 @@ bindKey 'end', 'Alt-Shift-.', (env) -> bindKey 'fullscreen', 'Command-Shift-Return', (env) -> Chrome.toggleFullscreen() + +bindKey 'console', 'Command-Ctrl-k', (env) -> + Chrome.inspector().showConsole(1) diff --git a/src/osx.coffee b/src/osx.coffee index 0b0177c30..a815da277 100644 --- a/src/osx.coffee +++ b/src/osx.coffee @@ -26,6 +26,10 @@ Chrome = throw "I DON'T KNOW HOW TO DEAL WITH #{position}" # path - Optional. The String path to the file to base it on. + inspector: (webView) -> + webView ?= WindowController.webView + @_inspector ?= OSX.WebInspector.alloc.initWithWebView webView + createWindow: (path) -> c = OSX.AtomWindowController.alloc.initWithWindowNibName "AtomWindow" c.window