(html: string)
| 410 | // viable; pure HTML + CDN-library pages (Chart.js etc.) match no signal and |
| 411 | // pay zero inline-script cost. |
| 412 | function needsJsxRuntimeInHtml(html: string): boolean { |
| 413 | return ( |
| 414 | hasTextBabelScript(html) || |
| 415 | html.includes('ReactDOM.createRoot') || |
| 416 | html.includes('React.createElement') || |
| 417 | html.includes('IOSDevice') || |
| 418 | html.includes('DesignCanvas') || |
| 419 | html.includes('AppleWatchUltra') || |
| 420 | html.includes('AndroidPhone') || |
| 421 | html.includes('MacOSSafari') |
| 422 | ); |
| 423 | } |
| 424 | |
| 425 | function hasTextBabelScript(html: string): boolean { |
| 426 | let found = false; |
no test coverage detected