title: sending a command from a virtual document in a vscode extension
body: <p>I am making a Visual Studio Code extension, where I make a virtual document </p>
  
  <pre class="lang-ts prettyprint-override"><code>let provider = new TextDocumentContentProvider();
  let registration = vscode.workspace.registerTextDocumentContentProvider('nucleus-preview', provider);
  </code></pre>
  
  <p>And I register a command with:</p>
  
  <pre class="lang-ts prettyprint-override"><code>vscode.commands.registerCommand('extension.sendMessage', (message) =&gt; {
      console.log('the message is ', message)
  });
  </code></pre>
  
  <p>In the virtual document I want to send a message back to the extension using JavaScript.</p>
  
  <p>If I have a link in the virtual document like such:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;a href="command:extension.sayHi?message=hi"&gt;say Hi&lt;/a&gt;
  </code></pre>
  
  <p>It calls the command but the message is undefined. That's as far as I got.  </p>
  
  <p>I don't want to call it using a link, I want to send the message using TypeScript from a method of a Polymer Element (v2) in the virtual doc.</p>