title: confirmation before exit dialog
body: <p>In most pages, if your doing an action, (like editing, creating), and when I attempt to exit,  it mostly prompts me if I really want to exit. The dialog gives me two options: leave or cancel and continue. How do you accomplish this in JavaScript? Do I have to use a meta element? <strike>And please don't mention <code>beforeunload</code>, unless it's the true and only way to accomplish this.</strike></p>