PortalSink
Receives the markup of the portals a server render produces: what PortalContext provides when the render was given a portals collector.
Receives the markup of the portals a server render produces: what PortalContext provides
when the render was given a portals collector.
Import#
ts
import type { PortalSink } from "@shadow-js/web/extend";
Signature#
ts
interface PortalSink {
/**
* Records the markup of the portal with hydration key `key`. A key recorded again replaces the
* earlier markup. Throws an `SsrError` whose `code` is `SSR_PORTAL_LIMIT` past 256 portals in one
* render.
*/
add(key: string, html: string): void;
}
Members#
| Name | Type | Description |
|---|---|---|
add |
add(key: string, html: string): void |
Records the markup of the portal with hydration key key. A key recorded again replaces the earlier markup. Throws an SsrError whose code is SSR_PORTAL_LIMIT past 256 portals in one render. |