fast icon indicating copy to clipboard operation
fast copied to clipboard

fix: Update use of HydrationElementController to only be used during initial load

Open janechu opened this issue 6 months ago • 1 comments

🐛 Bug Report

Currently defer-and-hydrate does not get applied in the forCustomElement method of the HydratableElementController. This should be rectified and assumed that defineAsync() is being used as this option currently only works in a flakey manner when using define().

Additionally the following logic should be added:

  • 'hydrate' should apply the needs-hydration attribute only
  • These attributes should only be applied if hasExistingShadowRoot is true during component instantiation, this ideally should be bypassed in future by another system that determines if the page is being evaluated during a first load and then defer back to the ElementController instead of the HydratableElementController

janechu avatar Aug 26 '25 21:08 janechu

Reopening for the "hydrate"/"needs-hydration" part

radium-v avatar Nov 11 '25 23:11 radium-v