title: How to use chrome.printerProvider API
body: <p>I find the developer link; <a href="https://developer.chrome.com/extensions/printerProvider" rel="nofollow noreferrer">https://developer.chrome.com/extensions/printerProvider</a></p>
  
  <p>But, couldn't understand how to use it.</p>
  
  <p>I've tried to print the current page without showing a print popup.</p>
  
  <p>To be able to achieve it, I look printer provider, but was not successful.</p>
  
  <p><em>manifest.json</em>:</p>
  
  <pre class="lang-json prettyprint-override"><code>{
    "name": "Print this page",
    "description": "Adds a print button to the browser.",
    "version": "1.1",
    "background": {
      "scripts": ["background.js"]
    },
    "permissions": [
      "tabs", "http://*/*", "https://*/*", "printerProvider"
    ],
  
  
    "browser_action": {
      "default_icon": "icon.png"
    },
    "manifest_version": 2
  }
  </code></pre>
  
  <p><em>background.js</em></p>
  
  <pre class="lang-js prettyprint-override"><code>chrome.printerProvider.onGetCapabilityRequested.addListener(function callback) {
      alert(callback);
  });
  
  
  chrome.printerProvider.onGetPrintersRequested.addListener(function callback){
      console.log(callback);
  });
  </code></pre>
  
  <p>But, these callbacks return nothing.</p>
  
  <p>How can I use/trigger these events?</p>