mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 09:52:31 +00:00
19 lines
678 B
HTML
19 lines
678 B
HTML
<!DOCTYPE html>
|
|
<script src="include.js"></script>
|
|
<my-custom-element></my-custom-element>
|
|
<script>
|
|
test(() => {
|
|
class MyCustomElement extends HTMLElement {
|
|
constructor() {
|
|
super();
|
|
const shadow = this.attachShadow({ mode: 'open' });
|
|
const style = document.createElement('style');
|
|
shadow.appendChild(style);
|
|
println(`shadow.styleSheets.length=${shadow.styleSheets.length}`);
|
|
println(`document.styleSheets.length=${document.styleSheets.length}`);
|
|
}
|
|
}
|
|
|
|
customElements.define('my-custom-element', MyCustomElement);
|
|
});
|
|
</script>
|