coyotte508 HF Staff commited on
Commit
9e0c755
·
verified ·
1 Parent(s): 49526f4

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +4 -2
index.html CHANGED
@@ -8,7 +8,9 @@
8
  <script>
9
  window.addEventListener("message", event => {
10
  console.log("event", event);
11
- document.querySelector("#plan").text = JSON.stringify(event.data.plan, null, 2);
 
 
12
  })
13
  window.parent?.postMessage({type: "USER_PLAN_REQUEST"}, "*");
14
  </script>
@@ -21,7 +23,7 @@
21
  Also don't forget to check the
22
  <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
23
  </p>
24
- <pre id="plan"></pre>
25
  </div>
26
  </body>
27
  </html>
 
8
  <script>
9
  window.addEventListener("message", event => {
10
  console.log("event", event);
11
+ if (event.data.type === "USER_PLAN") {
12
+ document.querySelector("#plan").textContent = JSON.stringify(event.data.plan, null, 2);
13
+ }
14
  })
15
  window.parent?.postMessage({type: "USER_PLAN_REQUEST"}, "*");
16
  </script>
 
23
  Also don't forget to check the
24
  <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
25
  </p>
26
+ <pre id="plan">...</pre>
27
  </div>
28
  </body>
29
  </html>