title: Creating an HTML dialog pop-up in chrome extension
body: <p>I'm working on a Chrome extension that will pop up a dialog box in the center of the screen when the user hits a keyboard shortcut. It will then use JavaScript to asynchronously load in content from the MediaWiki API. But I'm having difficulty figuring out how to create and display a dialog with JavaScript. I don't want to use the Chrome <code>html-popup</code> browser action, because it appears off in the corner of the screen. </p>
  
  <p>I know how to use JavaScript to display an existing HTML dialog box, as <a href="https://stackoverflow.com/questions/32079003/using-javascript-to-create-a-chrome-style-alert">this answer explains</a>, but I don't know how to insert one into the DOM. I don't want to use JavaScript's <code>alert</code> function, since that opens a separate window. So is there a way to create and display an HTML modal dialog when an event triggers a JavaScript function in a chrome extension? </p>