(html: string)
| 30 | `; |
| 31 | |
| 32 | export function assembleDocument(html: string): string { |
| 33 | return `<!DOCTYPE html> |
| 34 | <html> |
| 35 | <head> |
| 36 | <meta charset="utf-8"> |
| 37 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 38 | <meta http-equiv="Content-Security-Policy" content=" |
| 39 | default-src 'self'; |
| 40 | script-src 'unsafe-inline' 'unsafe-eval' |
| 41 | https://cdnjs.cloudflare.com |
| 42 | https://esm.sh |
| 43 | https://cdn.jsdelivr.net |
| 44 | https://unpkg.com; |
| 45 | style-src 'unsafe-inline'; |
| 46 | img-src 'self' data: blob:; |
| 47 | font-src 'self' data:; |
| 48 | connect-src 'self'; |
| 49 | "> |
| 50 | <style> |
| 51 | ${THEME_CSS} |
| 52 | ${SVG_CLASSES_CSS} |
| 53 | ${FORM_STYLES_CSS} |
| 54 | </style> |
| 55 | </head> |
| 56 | <body> |
| 57 | <div id="content"> |
| 58 | ${html} |
| 59 | </div> |
| 60 | <script> |
| 61 | ${BRIDGE_JS} |
| 62 | </script> |
| 63 | </body> |
| 64 | </html>`; |
| 65 | } |
no outgoing calls
no test coverage detected