enable lazy initialization of the event target and skip the initialization when rendering on a
server platform to avoid unsafe references to window or document
fix #77, #115
Please check if the PR fulfills these requirements
[X] Tests for the changes have been added (for bug fixes / features)
[X] Docs have been added / updated (for bug fixes / features)
What kind of change does this PR introduce? (check one with "x")
[X] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:
What is the current behavior? (You can also link to an open issue here)
Library does not support SSR applications.
What is the new behavior?
Adds SSR support when using the default interrupt sources and enables custom interrupt sources to potentially support SSR.
Does this PR introduce a breaking change? (check one with "x")
[ ] Yes
[X] No
Other information:
This PR was inspired by the previous PR for SSR support #130. It builds on the previous PR and addresses the problem of creating the default interrupt sources array while rendering on the server without referencing unavailable objects such as document and window.
Coverage remained the same at 100.0% when pulling c96f24327396471e67d20f4858d87c88b299ac0e on worksoncloud:ssr-platform into e2af040c3de3332f4a495cd92925d6faf534419b on moribvndvs:master.
enable lazy initialization of the event target and skip the initialization when rendering on a server platform to avoid unsafe references to window or document
fix #77, #115
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x")
What is the current behavior? (You can also link to an open issue here) Library does not support SSR applications.
What is the new behavior? Adds SSR support when using the default interrupt sources and enables custom interrupt sources to potentially support SSR.
Does this PR introduce a breaking change? (check one with "x")
Other information: This PR was inspired by the previous PR for SSR support #130. It builds on the previous PR and addresses the problem of creating the default interrupt sources array while rendering on the server without referencing unavailable objects such as
document
andwindow
.