saus
saus copied to clipboard
Buffer click/input events while the page is hydrating
Once the page is hydrated, apply the buffered events in order.
Prior art:
- https://github.com/ryansolid/dom-expressions/blob/6021864cc1d521dcf3ae91b2d20f585557e9875c/packages/dom-expressions/src/server.js#L261-L285
- https://github.com/ryansolid/dom-expressions/blob/6021864cc1d521dcf3ae91b2d20f585557e9875c/packages/dom-expressions/src/client.js#L240-L254
This is important for cached <img> sources to emit load and error events after the page is hydrated. Otherwise, components will never receive them and have to resort to complex workarounds.