title: TypeScript Modal Window
body: <p>I need to show a Modal in TypeScript. I don't want to use any library(bootstrap,..) to style it, I have to use own less styling for it. what I can use to Create a Modal? it can be a javascript modal that supported by typescript and by all browsers. 
  I tried to use showModal() like this:</p>
  
  <p>This is my TypeScript Code:</p>
  
  <pre><code>function CreateModal() {
    document.getElementById("myDialog").showModal();
  }
  </code></pre>
  
  <p>It gave me this error - showModal is not exists.
  even if It works it is not supported in IE and Firefix only works in chrome. </p>
  
  <p>and this is my index.html</p>
  
  <p></p>
  
  <pre><code>&lt;script src="scripts/TypeScripts/Modal.js"&gt;&lt;/script&gt;
  
  &lt;button onclick="CreateModal()"&gt;Show dialog&lt;/button&gt;
  &lt;dialog id="myDialog"&gt;This is a dialog window&lt;/dialog&gt;
  </code></pre>
  
  <p></p>
  
  <p>I tried to use Onclick as well but it says does not existed. </p>
  
  <pre><code> span.onclick = function () {
      modal.style.display = "none";
  }
  </code></pre>