web_panic_report 0.3.0

A panic hook which replaces an HTML element with a bug report form.
Documentation
<!DOCTYPE html>
<html lang="en-US">

<head>
  <!-- Title -->
  <title>Panic example</title>
  <script>
    let wasmModule;
  </script>
  <script type="module">
    import wasm_bindgen from './api/wasm.js';
    async function run() {
      wasmModule = await wasm_bindgen("/api/wasm.wasm");
    }
    run();
  </script>
</head>

<body>
  With web_panic_report, an HTML container with an id is replaced with the report form: <br />
  <div id="test-container" style="background-color: black; width: 400px; height: 400px;">
    <div
      style="position: absolute; width: 400px; height: 400px;color: white;text-align: center;display:grid;align-content: center;justify-content: center;">
      Canvas (or DOOM) goes here
      <br />
      <button onclick="triggerPanic()" style="width: auto;">Trigger Panic</button>
    </div>
    <canvas id="my_canvas" width="400px" height="400px" style="background: black" />
  </div>

  <script>
    function triggerPanic() {
      if (wasmModule) {
        wasmModule.trigger_panic(); /* Our rust function! */
      } else {
        console.error("WebAssembly module not loaded yet.");
      }
    }
  </script>
</body>

</html>