<h3 dir="auto">Preflight Checklist</h3>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for a feature request that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Problem Description</h3>
<p dir="auto">The Chrome developer tools network tab lets you right click an item and select "open in new tab". When you do (as far as I can tell) nothing happens. Nothing gets logged to the command line, and the expected <code class="notranslate">new-window</code> event is not called.</p>
<h3 dir="auto">Proposed Solution</h3>
<p dir="auto">I would expect "open in new tab" to trigger the <code class="notranslate">new-window</code> event on the <code class="notranslate">devToolsWebContents</code> (or possibly the <code class="notranslate">webContents</code> itself) for Electron developers to handle like any other <code class="notranslate">new-window</code> event.</p>
<h3 dir="auto">Preflight Checklist</h3>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for a feature request that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Problem Description</h3>
<p dir="auto">In devtools, when you click <code class="notranslate">Open in new tab</code> for example, nothing happens.</p>
<h3 dir="auto">Proposed Solution</h3>
<p dir="auto">I would like to have a way to change the click event for devtools menu items. Or have some event that we can listen for and then do the action we want to do.</p>
<p dir="auto">For example, you could do:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="app.on('devtools-menu-item-clicked', (event, menu: Electron.MenuItem, id: number) =&gt; {
    if(menu.label == &quot;Open in new tab&quot;) // do whatever
})"><pre class="notranslate"><span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'devtools-menu-item-clicked'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">event</span><span class="pl-kos">,</span> <span class="pl-s1">menu</span>: <span class="pl-smi">Electron</span><span class="pl-kos">.</span><span class="pl-smi">MenuItem</span><span class="pl-kos">,</span> <span class="pl-s1">id</span>: <span class="pl-smi">number</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-k">if</span><span class="pl-kos">(</span><span class="pl-s1">menu</span><span class="pl-kos">.</span><span class="pl-c1">label</span> <span class="pl-c1">==</span> <span class="pl-s">"Open in new tab"</span><span class="pl-kos">)</span> <span class="pl-c">// do whatever</span><span class="pl-kos"></span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<h3 dir="auto">Alternatives Considered</h3>
<p dir="auto">Using a devtools extension, however Chromium only exposes <code class="notranslate">chrome.devtools.*</code> APIs to devtools extensions.</p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">n/a</p>