serializeIslandProps
Validate + encode island props for the `<script type="application/json">` payload.
Validate + encode island props for the <script type="application/json"> payload.
Throws IslandPropsError naming the offending path. Every < is emitted as its
unicode escape so a string value containing a closing script tag cannot break out.
Import from @homepages/template-kit or @homepages/template-kit/island-runtime.
Signature
Section titled “Signature”function serializeIslandProps(props: IslandProps): stringParameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
props |
IslandProps |
required |
Returns
Section titled “Returns”string
See also
Section titled “See also”deserializeIslandPropsislandIdATTR_ISLAND_FRAMELESSATTR_ISLAND_IDATTR_ISLAND_KEYATTR_ISLAND_PROPSEDITOR_BRIDGE_PROPEDITOR_BRIDGE_PROTOCOLISLAND_CAPTURE_HOLDS_GLOBALISLAND_ELEMENTIslandPropsErrorEditorBridgeIslandEditorIslandModuleEditorBridgeSelectionEditorSelectionIslandComponentIslandEditorOptionsIslandPropsIslandServerFrame