Skip to content

server-side rendering fixups#39

Open
PhilipTrauner wants to merge 1 commit intohome-assistant:nextfrom
OHF-Device-Database:fix/slot-controller-ssr
Open

server-side rendering fixups#39
PhilipTrauner wants to merge 1 commit intohome-assistant:nextfrom
OHF-Device-Database:fix/slot-controller-ssr

Conversation

@PhilipTrauner
Copy link
Copy Markdown

@PhilipTrauner PhilipTrauner commented Feb 19, 2026

a couple webawesome components are currently unavailable in Lit's server-side rendering context because they call unavailable methods

thankfully we aren't the first ones running into this issue
tldr.: page, button, and drawer all call methods that are unavailable in an SSR context (can't include a fix for page, as it is pro only)

there is a pending Lit PR that adds more fully-featured EventTarget support, which removes the need to suppress addEventListener and removeEventListener calls
childNodes and querySelector remain unsupported, which are required for HasSlotController

i don't have enough experience with webawesome to know how big of a deal it is to effectively stub out all HasSlotController functionality

there isn't a lot of surface area to evaluate against in the device database (a single occurrence of button to be precise 🙈), but so far i did not run into any hydration mismatches
this isn't to say that they won't happen, but i think tackling those as our surface area increases is better than being blocked from using important components like <wa-button> outright 😅

none of these changes affect client-side rendered usage

@bramkragten
Copy link
Copy Markdown
Member

Can you upstream these fixes?

@wendevlin
Copy link
Copy Markdown
Member

@PhilipTrauner please resolve the conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants