title: Need to link directly to a Chrome internal page, from within a page of a Chrome Extension
body: <p>I just spent the last 7 hours straight trying to find a way to link directly to a Chrome internal page. For now I have given up. I just instructed people to "right-click and open in new tab".</p>
  
  <p>I have tried everything, from html to css to javascript, but nothing is working. Nothing happens when I click the link, even though right-clicking the link and opening it in a new tab works perfect.</p>
  
  <p>Javascript failed attempts:</p>
  
  <pre><code>&lt;div class="links"&gt;
    &lt;a href="chrome://net-internals/" onclick="window.open('chrome://net-internals/');"&gt;TESTAA&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;div class="links"&gt;
    &lt;a href="chrome://net-internals/" onclick="window.location('chrome://net-internals/');"&gt;TESTAA&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>There is no error page. Simply nothing happens when you click. If you force it to open in a new tab using <code>target="_blank"</code>, it only opens a blank tab.</p>
  
  <h1>UPDATE! SOLVED!</h1>
  
  <p><strong>----- STEP 1-----</strong></p>
  
  <p>Place the following code in the background.html page (background.html is called in the manifest.json): </p>
  
  <pre><code>function openNetInternals() { 
    chrome.tabs.create({url: 'chrome://net-internals/'});
  }
  </code></pre>
  
  <p><strong>----- STEP 2 -----</strong></p>
  
  <p>Put this code for the link (in the html page): </p>
  
  <pre><code>&lt;a href="chrome://net-internals/" onclick="chrome.extension.getBackgroundPage().openNetInternals()"&gt;Net&lt;/a&gt;
  </code></pre>
  
  <p><strong>----- STEP 3 -----</strong> </p>
  
  <p>Make sure to refresh the extension. 
  It will work now.</p>