Implementation of getEventListeners is at InspectorDOMAgent::getEventListeners which is called from InspectedScriptHost::getEventListenersImpl which, in turn, can be accessed from an InjectedScriptManager using InjectedScriptManager::createForPage().
What I am trying to do is to call https://developer.chrome.com/devtools/docs/commandline-api#geteventlistenersobject without showing and preferably without loading the DevTools.
After opening DevTools as a hidden window, how can I send a message to its javascript context and get the results?