同步完整源码 - 2026-05-24

This commit is contained in:
xiaoxue
2026-05-24 23:05:48 +08:00
commit 21ef9025a7
425 changed files with 109915 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
<script>
let h1 = null;
let button = null;
let clicked = false;
window.addEventListener('DOMContentLoaded', () => {
const shadowRoot = document.body.attachShadow({mode: 'open'});
h1 = document.createElement('h1');
h1.textContent = 'Hellow Shadow DOM v1';
button = document.createElement('button');
button.textContent = 'Click';
button.addEventListener('click', () => clicked = true);
shadowRoot.appendChild(h1);
shadowRoot.appendChild(button);
});
</script>