* @param {AccumulatedContent} content * @param {Renderer} renderer * @returns {AccumulatedContent & { hashes: { script: Sha256Source[] } }}
(content, renderer)
| 801 | * @returns {AccumulatedContent & { hashes: { script: Sha256Source[] } }} |
| 802 | */ |
| 803 | static #close_render(content, renderer) { |
| 804 | for (const cleanup of renderer.#collect_on_destroy()) { |
| 805 | cleanup(); |
| 806 | } |
| 807 | |
| 808 | let head = content.head + renderer.global.get_title(); |
| 809 | let body = content.body; |
| 810 | |
| 811 | for (const { hash, code } of renderer.global.css) { |
| 812 | head += `<style id="${hash}">${code}</style>`; |
| 813 | } |
| 814 | |
| 815 | return { |
| 816 | head, |
| 817 | body, |
| 818 | hashes: { |
| 819 | script: renderer.global.csp.script_hashes |
| 820 | } |
| 821 | }; |
| 822 | } |
| 823 | |
| 824 | /** |
| 825 | * @param {HydratableContext} ctx |
no test coverage detected