dina1 commited on
Commit
f4a8fe3
·
verified ·
1 Parent(s): 2f5969c

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +6 -1
templates/index.html CHANGED
@@ -66,7 +66,12 @@
66
  iframe.id = "generatedFrame";
67
  iframe.style.width = "100%";
68
  iframe.style.height = "72vh";
69
- iframe.srcdoc = data.html;
 
 
 
 
 
70
  outputEl.appendChild(iframe);
71
  // Add Download Report button
72
  const btn = document.createElement("button");
 
66
  iframe.id = "generatedFrame";
67
  iframe.style.width = "100%";
68
  iframe.style.height = "72vh";
69
+ if (data.link) {
70
+ iframe.src = data.link;
71
+ } else {
72
+ const blob = new Blob([data.html], { type: "text/html" });
73
+ iframe.src = URL.createObjectURL(blob);
74
+ }
75
  outputEl.appendChild(iframe);
76
  // Add Download Report button
77
  const btn = document.createElement("button");