Hello,
As per #210 (comment), I am filing an issue to add support for getHTML().
Recently baseline (2024) across browsers, makes sense to implement in Linkedom. MDN
Element.getHTML({serializableShadowRoots: true})
Example
<hello-world>
<span>Slotted Hello World!</span>
</hello-world>
class HelloWorld extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: "open", serializable: true });
}
....
}
Rendered as this:
<hello-world>
<span>Slotted Hello World</span>
<template shadowroot="open" shadowrootserializable="">
<style>
:host {
display: inline-block;
background: pink;
border: 2px dashed yellow;
}
</style>
<div><slot></slot></div>
</template>
</hello-world>