Variable: SuspenseScript
Estimated reading time: less than 1 minuteSmall client-side helper used to replace suspense fallbacks with streamed template content.
As this script is the only residue of this package that is actually sent to the client, it's important to keep it as small as possible and also include the license to avoid legal issues.
It requires support for <template>.content and Element.remove(). IE11 is not
supported.
Pending data-sr elements are kept pending if their fallback has not yet been rendered, on each render a try to switch all pending data-sr is attempted until no elements are substituted.
This script must be loaded before streamed suspense replacement chunks execute. You do not
need to load it manually unless
SuspenseRoot.autoScript is
set to false.