I propose removing the constraint that prevents the `console-message` event from bubbling up when rendering a BrowserWindow in `offscreen` mode.

Currently, this line here is the culprit...

https://github.com/electron/electron/blob/9bd7d53cf85ac36e81a080c4fd0572ca34d395ff/atom/browser/api/atom_api_web_contents.cc#L484

Is there a technical constraint I'm not aware of preventing this from working?

[Cypress](https://github.com/cypress-io/cypress) drives automated tests in Electron and we'd love the ability to capture console messages programmatically like this. We currently run Electron primarily in offscreen mode.

I'm aware that it's possible to redirect the internal chromium logger, but it doesn't stringify objects so it's fairly useless. All you primarily see is [object Object].
atom/browser/api/atom_api_web_contents.cc
content::RenderFrameHost* frame_host) {
  bool handled = true;
  auto relay = NativeWindowRelay::FromWebContents(web_contents());
  if (!relay)
    return false;
  IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(WebContents, message, frame_host)
    IPC_MESSAGE_HANDLER(AtomAutofillFrameHostMsg_ShowPopup, ShowAutofillPopup)
  IPC_END_MESSAGE_MAP()
  IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(NativeWindow, message, frame_host)
    IPC_MESSAGE_FORWARD(AtomAutofillFrameHostMsg_HidePopup,
      relay->window.get(), NativeWindow::HideAutofillPopup)
    IPC_MESSAGE_UNHANDLED(handled = false)
  IPC_END_MESSAGE_MAP()
  return handled;
}
void WebContents::WebContentsDestroyed() {