Lit SSR DOM 模擬
在 Node 中執行時,Lit 會自動匯入並使用一組 DOM 填充碼,並定義 customElements
全域變數。只會實作定義和註冊元件所需的最少 DOM 介面。這包括一些關鍵的 DOM 類別和大致運作的 CustomElementRegistry
。
✅ 表示項目實作的功能與瀏覽器中相同。
屬性 | 註解 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Element | ⚠️ 部分實作
| ||||||||||||||
HTMLElement | ⚠️ 空類別 | ||||||||||||||
CustomElementRegistry |
| ||||||||||||||
customElements | CustomElementRegistry 的實例 |