[WICG/webcomponents] getOutterHTML (Issue #1079)

I am using SSR with web components, `getHTML` is not enough. It would be nice to have `getOutterHTML`. 

Let's say I want to save the full page, I have to do this ugly thing to be able to save the `html` element attributes too.

```js
let content = '<!DOCTYPE html>\n'
content +=
    document.documentElement.outerHTML.match(/^<html[^>]*>/)[0] ||
    ''
content += document.documentElement.getHTML({
    serializableShadowRoots: true,
})
content += '</html>'

````

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/1079
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/1079@github.com>

Received on Wednesday, 16 October 2024 01:54:28 UTC